Plugin paypal

Need to sell products. Paypal plugin bring a cart to your geeklog site.

The PayPal plugin allows you to have an online product list and accept payment via PayPal. Products can be downloadable as program or pdf files, or can be physic as books, CD, DVD… New: Paypal plugin 1.2 handle subscriptions. You can sell access to your content.

Instructions for (un)installation of the paypal plugin for geeklog.

Pre-install

Require PHP 5.2 or greater. I also recommend using the jquery plugin to support lightbox feature in the shop.

Back-up your sites database.

  • visit {site_url}/admin/database.php

Auto Install

1. As one of your site's Root users

  • visit {site_url}/admin/plugins.php
  • Upload the plugin archive (.zip) : Select it on your HD and press Upload.

2. If the installation completed successfully you can skip to the next step. Otherwise, check the geeklog error.log for errors.

  • <geeklog_dir>/logs/error.log

3. Set the necessary permissions to <geeklog_dir>/logs/paypal_downloads.log.

  • chmod 666 <geeklog_dir>/logs/paypal_downloads.log

4. Modify paypal's config online to reflect your site and suite your needs.

Take special note of the $_PAY_CONF['paypalURL'] variable. It should be www.sandbox.paypal.com for testing on paypal's development site. For live web sites it should point to www.paypal.com.

5. Update the security settings. By default the paypal plugin will grant administrative rights to the plugin to the Root Group. Shopping (purchasing) privileges will be granted to the “Logged-In Users” group. Viewing privileges will be granted to the “All Users” group. By adding users or groups as members of the “Paypal Admin” or “Paypal Users” or “Paypal Viewers” group you can control who has administrative, shopping, and viewing privileges.

  • visit {site_url}/admin/user.php
  • visit {site_url}/admin/group.php

6. Create images folders

Under your public_html/images folder, create a paypal folder. And create 4 new folders in this paypal folder : attributes, cache, categories and products

Manual install

Geeklog can auto install plugins. See above.

If you need to manualy install the plugin.

  • Backup your Geeklog database because the paypal plugin adds tables. You can do this with the built in database backup facility in the Admin menu.
  • Uncompress the paypal plugin archive while in the path-to-geeklog/plugins directory. The archive will create a directory called paypal.
  • Under your <public_html> directory, create a directory called paypal.
  • Under <public_html>/admin/plugins/ directory, create a directory called paypal.
  • Change to your path-to-geeklog/plugins/paypal directory.
  • Copy the files in the admin directory to the admin/plugins/paypal directory you created in step 4.
  • Copy the files in the public_html directory to the public_html/paypal directory you created in step 3.
  • Under <public_html>/images/ directory, create a directory called site1.
  • Under <public_html>/images/site1/ directory, create a directory called paypal.
  • Under <public_html>/images/site1/paypal directory, create a directory called products.
  • Under <public_html>/images/site1/paypal directory, create a directory called cache.
  • Go to the plugin administration page. The paypal plugin should show up with a link to install it. Click this link. The install page will tell you if it was successful or not. If not, examine the Geeklog error.log in path-to-geeklog/logs/ to see what the problem was. Fix the problem and re-install.
  • Create images folders (see above).

Paypal account

A paypal business account is required in order for this plugin to operate correctly. In addition, there are several items in your paypal account that must be set up correctly in order purchases to be logged.

1. Create a PayPal business account (note: you can update an existing account to a business account by logging into the paypal account and clicking on “Upgrade Account”)

2. Verify your account. This is needed to transfer money out of your paypal account and into a bank account. You can do this from your paypal account.

3. Update seller preferences. From the “My Account” tab or your Paypal account, select the “Profile” sub-tab. Click on “Instant Payment Notification Preferences”. For french accounts “Mon compte » Préférences » Préférences des ventes » Préférences de Notification instantanée de paiement”. Edit the preferences. You want to ENABLE instant payment notification. In the box provided for a URL, enter:

  • {site_url}/paypal/ipn.php

4. Update *optional* seller preferences. From the “My Account” tab or your Paypal account, select the “Profile” sub-tab. You may want to consider entering information for the following date:

  • Sales Tax
  • Shipping Calculations
  • Payment Receiving Preferences
  • Reputation
  • Website Payment Preferences
  • Custom Payment Pages
  • Invoice Templates
  • Language Encoding

Uninstall

0. Back-up your site database, just in case.

  • visit {site_url}/admin/database.php

1. As one of your site's Root users, run the plugin's uninstallation script.

  • visit {site_url}/admin/plugins.php and edit the paypal plugin. Select the delete button.

2. Delete the directories and files created during the plugins installation.

  • rm -rf <geeklog_html_dir>/paypal
  • rm -rf <geeklog_html_dir>/admin/plugins/paypal
  • rm -rf <geeklog_dir>/plugins/paypal

Upgrade

To upgrade an existing Paypal plugin installation, please upload all the files from the archive to their respective location, replacing the older versions of the same files.

To version 1.1+

For upgrading to version 1.1 do not make an automatic upgrade by uploading the archive via the admin panel, it won't work. Please make a manual (ftp) upload of the files.

Once you've uploaded all the files, log into your site as a member of the Root group (e.g. as user Admin). Go to the Admin's “Plugins” panel.

You can upgrade just by clicking the icon “Update” or click on the “edit” link for the paypal plugin. You will be presented with an “Update” button. Click that button and you should get a message that the upgrade was successful. That's all.

Go to the paypal plugin online config to review your settings.

Remove old BaseIPN.class.php and IPN.class.php files from the plugins/paypal folder as they are now include in the classes folder. You can also remove your plugins/paypal/config.php file and your public_html/paypal/cache folder

To version 1.2

To be compatible with auto upgrade (by uploading the plugin archive) in the future and with Multi plugin, the “products” and “cache” folders where the paypal plugin stores product images had to be move to a new public_html/images/paypal/ folder.

Move public_html/paypal/images/products folder → public_html/images/paypal/products

Move public_html/paypal/images/cache folder → public_html/images/paypal/cache

Move these folders before uploading the plugin archive (auto update) or your product images will be lost. Make sure these new folders are writable.

To version 1.4

Under your public_html/images/paypal folder, create 2 new folders : attributes and categories

Configuration

Plugin configuration is now online with paypal vers 1.1+

Main settings

General settings
Paypal public folderAllow to move the directory where the users's paypal program is store. Rename your public_html/paypal folder and change the config name according your new folder name.
Paypal menu label Allow to set a different menu label. Default is Shop.
Folder name for images
Paypal login required Restrict the access to the Logged-in Users group.
Hide Paypal menu Set to yes to hide the “paypal” entry from the top menu.
Paypal url URL for paypal verification should be www.paypal.com for live service or www.sandbox.paypal.com for testing. If your version of PHP is 4.3.0 or greater and OpenSSL has been compiled into PHP, you can prefix the url with ssl to encrypt the paypal 'postback'.
Receiver email address PayPal email addresses for your business receiver account.
Currency This is the currency that you want all transactions to occur in. Your Paypal account must have the choosen currency enabled (on the Paypal website see: Selling Preferences→Paypment Receiving Preferences). This plugin currently requires you to have only one currency balance enabled in your Paypal account.
Anonymous user can buy Do you allow anonymous users to make purchases without logging in first? Note that anonymous users won't have access to purchase history or to direct downloads.
Email User upon purchase yes if logged in users should get a purchase email. Configuration parameters to specify whether “on purchase” emails will be sent. You can edit the files templates/purchase_email_subject.txt and templates/purchase_email_message.txt to customize the email message. You should disable the *_attach options below if you are distributing large files or it is likely that a purchaser will be buying many medium files otherwise the email will become too large and will likely never be received.
Attach files to user's email message Yes if logged in users should get purchases emailed as attachments.
Email anonymous buyer upon purchase Yes if anonymous users should get a purchase email.
Attach files to anonymous buyer email Yes if anonymous users should get purchases emailed as attachments.
Enable pay by check Default is no
Enable buy now buttons Default is yes
Default Permissions
Permissions by default[0] Owner permissions
Permissions by default[1] Group permissions
Permissions by default[2] Members (Looged-in) permissions
Permissions by default[3] Anonymous permissions
Permissions are use to set owner, group, members and anonymous rights on products.

Display settings

Display settings
Main page header, autotag welcome Here you can use some text or autotags to custom your header.
Main page footer, autotag welcome too Here you can use some text or autotags to custom your footer.
Number of columns of products to display (max 1-4) Chose how many product you want to display by row.
Products list order Can by product name, product ID, product price.
Display list of memberships Do you want to display a link to the list of memberships. Yes or no.
Display 2nd buttons Buttons “Buy now” and “Add to cart are display after the short description on the product page. Do you want to display also buttons above the long description? Yes or no.
Display blocks Choose between left blocks only, right blocks only, both or none.
Display item ID on products list Do you want to display item ID on product list. In all cases, item id is displayed on product detail page.
Images settings
Max images per product Choose how many images you want to display for each product.
Max image width Image greater than this value will not be upload.
Max image height Image greater than this value will not be upload.
Max image size Image bigger than this value will not be upload.
Max thumbnail size Set the thumnail size for the products pictures.
Catalogue thumb width Set size in pixel. Default is 75
Catalogue thumb height Set size in pixel. Default is 75
Number of products to display per page 0 indicates that all products should be displayed on a single page.
Number of columns of categories to display Set to 0 to disable categories. If you don't have any categories set, this setting is meaningless.
Display category image Do you want to display image for each category. Yes or no
Category image width in pixelSet in pixel the image width. e.g 300
Paypal checkout page
The URL of the 150×50-pixel image displayed as your logo in the upper left corner of the PayPal checkout pages. PayPal recommends that you provide an image that is stored only on a secure (https) server.
The image at the top left of the checkout page. The image's maximum size is 750 pixels wide by 90 pixels high. PayPal recommends that you provide an image that is stored only on a secure (https) server.
The background color for the header of the checkout page Valid value is case-insensitive six-character HTML hexadecimal color code in ASCII.
The border color around the header of the checkout page. The border is a 2-pixel perimeter around the header space, which has a maximum size of 750 pixels wide by 90 pixels high Valid value is case-insensitive six-character HTML hexadecimal color code in ASCII.
The background color for the checkout page below the header Valid value is case-insensitive six-character HTML hexadecimal color code in ASCII.
The background color of the checkout page Valid value is case-insensitive six-character HTML hexadecimal color code in ASCII.

My shop

Shop details
Shop name Your shop name
Street 1 Street name
Street 2 street name
Postal code Postal code
City City name
Country Country name
Pro ID Professional ID, company ID, SIREN number (french), SIRET number (french), TVA or VAT number… It is the identification number for your selling activity.
Phone 1 Your phone number
Phone 2 Your phone number
Fax Your fax number

Usage

For Admin

On the admin paypal plugin page you can create, edit or remove products.

On new install or upgrade you will need to create 4 folders under the images/paypal folder

  • public_html/images/paypal/attributes
  • public_html/images/paypal/cache
  • public_html/images/paypal/categories
  • public_html/images/paypal/products

They must be writable.

Sell access to your content | Subscriptions

With paypal plugin 1.2+ your can sell access to content of your site or establish management paying members of a club or association.

This new version 1.2 introduces a new type of product, subscritions. This feature allows you to create membership for one or several days, weeks, months or years. Users who subscribe online are automatically added to a group you specify. Group members can then access content reserved for them during the entire period of their membership. Once it is completed, the member is automatically removed from the group.

How to sell access to your content?

Manage shippings

You need to create first a shipping destination, then create a shipper, and then create a shipping rate where you choose the shipper, the minimum weight (in kilograms), the maximum weight (in kilograms), the destination and the shipping amount.

How does this work?

Since paypal plugin 1.4 products can be set to Physical, Downloadable or Virtual/Service. For “Physical” product, you can set a weight (in kilograms) if you want to use shipping feature, and choose between “Apply shipping costs” or “No shipping - Free shipping” for each product.

Like this the cart can handle the total weight of items and can provide the display of different shipping costs according to destinations and services.

“Downloadable” or “Virtual/Service” products do not use shipping features.

Pay by check

With paypal plugin 1.3+ users can pay by check. When they validate the cart and choose to pay by check, there order is pending.

How to validate a pending order?

Blocks

Paypal plugin can display several blocks.

Cart Paypal cart block is automically created on install or upgrade. You can enable/disable it on the blocks admin page.
Random product A random product block is automically created on install or upgrade. You can enable/disable it on the blocks admin page.
Shop If needed you can add a shop block: Create a php block on the blocks admin page and set function to phpblock_paypal_displayProducts

Shop in a static page

You can add your shop (products display page) in a static php page (execute php):

echo phpblock_PAYPAL_displayProducts(); 

For Users

If jquery plugin is available and lightbox plugin is active, pictures products are display in a lightbox.

Users can print an online receipt for each purchases on the purchases history page. They also can find on this page a download link for each downloadable product they have purchased.

Autotags

[paypal : XXX] where XXX is the product id display a link to product page.

[paypal_product : YYY] where YYY is the product id display a product block with buttons.

FAQ

Q. Some HTML I tried to use in the product description got stripped out.

A. All HTML input (such as the product description field) gets check with geeklog's built in COM_checkHTML function. That function depends on the contents of $_CONF['user_html'] and $_CONF['admin_html'] array variables found in the config. Edit those to control what HTML is allowed in the paypal's HTML fields.

PAYPAL PRO

With version 1.2, paypal pro version will be available.

Why a Pro version? To enable and encourage the future development of the plugin, a small financial contribution is requested. This contribution allows you to enjoy the following additional functions:

  • Notify expiration: When the subscription of a member will expire, messages are sent by email to the member and the administrator of the site. A message is sent X days before the end of the subscription, another the same day as the end of the subscription, then another the next day.
  • Manual subscription: Admin can create manual subscription.

Avec la version 1.2, une version Pro du plugin Paypal sera disponible.

Pourquoi une version Pro ? Pour permettre et encourager le développement futur du plugin, une légère contribution financière est demandée. Cette contribution vous permet de profiter des fonctions supplémentaires suivantes:

  • Notification de fin de souscription : Lorsque la souscription d'un membre arrive à son terme, des messages sont envoyés par email au membre et à l'administrateur du site pour les prévenir. Un message X jours avant la fin de la souscription, un autre le jour même de la fin de la souscription, puis un nouveau le lendemain.
  • Souscription manuelle : L'administrateur peut créer manuellement une souscription.

Buy Paypal Pro version

Install Paypal Pro Version

  1. To install Paypal pro version, just upload the proversion.php file in the {your_geeklog_path}/plugins/paypal/proversion folder.
  2. Done.
  3. Enjoy.

HISTORY

Version 1.5 | Future release

  • TODO stats of purchases by product or category (daily, weekly, monthly, yearly, ever)
  • TODO bestsellers block
  • TODO handle donations
  • TODO handle rents
  • TODO handle multi sellers
  • TODO handle new and used products
  • TODO handle manual purchase for cash payment
  • [pro] handle attributes such as size, color
  • [pro] handle very simple stock management

Version 1.4.3 | Jan. 20th, 2012

  • [fix] javascript reloading informations.php page on input
  • [fix] html for anchors: Pay by check and Continue shopping
  • [fix] ipnlog and download history search function
  • [fix] timthumb script version 2
  • [fix] remove taxable product feature
  • [fix] search in lists (products, categories…)

Version 1.4.2 | Dec. 18th, 2011

  • [fix] downloads list for user
  • [fix] dowload function

Version 1.4.1 | Nov. 30th, 2011

  • [fix] purchase list
  • [fix] category filter if display category is set to none
  • [imp] memberships list

Version 1.4.0 | Nov. 21st, 2011

  • [new] SEO shop title and product title
  • [new] Rebuild purchases list
  • [new] Discounts and reference price
  • [new] creation date for each product
  • [new] handle shipping costs
  • [new] category editor
  • [new] categories breadcrumbs
  • [new] remove buy now button
  • [fix] Page navigation for category display
  • [fix] New link to edit page for pending order

Version 1.3.1 | Aug. 2nd, 2011

  • [fix] empty block header on products page and product detail page
  • [fix] language hardcoded on confirmation page and cart page
  • [new] config enable pay by paypal

Version 1.3 | July 15th, 2011

  • [new] display buy now button is set in config
  • [new] display item id is set in config
  • [del] remove images folder name in config
  • [new] move image settings in display settings
  • [new] handle manual purchase for check payment
  • [new] a purchase history link is now also in the user menu
  • [new] empty cart on paypal purchase success not on paypal checkout
  • [new] display active subscribers or all subscribers in the memberships list is set in config
  • [new] update search integration (return image and price)
  • [new] Item id is displayed on admin products list and on product detail page. You can also set in config the display on users products list.
  • [new] set in config the display of left blocks, right blocks, both or none
  • [update] timthumb script to version 1.28
  • [update] Update to Geeklog 1.8.0 script class
  • [new] Merge paypal css and jcart css
  • [bug] Product images size are now set by config
  • [new] Pro: Create membership before create manual subscription

Version 1.2.1 | Jan. 6th, 2011

  • Fix Buy Now button not working on details product page

Version 1.2 | Jan. 3rd, 2011

  • New autotag paypal_product to display product image and buttons
  • New geeklog search integration
  • New a link for available downloads are now under “My purchase” page
  • New products handle security access (owner, group, loggin-users, anonymous)
  • New move pictures dictory (products and cache)
  • New customer can print a receipt for each transaction
  • New customer can set their details before printing a receipt
  • New improve the dowloads history page
  • New checkout paypal page can be customise in the config
  • New table users for user details
  • New config shop details
  • New hide product from random block
  • New custom item id
  • New handle memberships and subscriptions
  • New display memberships list (config)
  • New IPN list revamped
  • New Purchases list revamped for users and admin
  • New introducing product types (product, subscription)

Version 1.1.4 | July 8th, 2010

  • New random product block
  • New admin downloads list
  • New Products can be active or not
  • New downloads are recorded
  • Config Number of product's columns to display
  • New Products can be hidden in the catalog
  • New Products hits are available for admin

Version 1.1.1 | July 2nd, 2010

  • Bug fix for upgrade from version 1.0

Version 1.1 | July 1st, 2010

  • Added public folder setting
  • Purchase history for users is now available
  • Paypal errors are now log
  • Added dynamic images for the link checkout with paypal
  • Added css files to style the shop and the cart
  • Added jquery feature for ajax
  • An ajax Cart is now include
  • A block with a cart view is also available
  • Images uploader
  • Support jquery lightbox (need jquery plugin)
  • Online config
  • Create database downloads

Version 1.0 | Dec. 21st, 2009

  • Ported to geeklog 1.6.0
  • Added Multi-language support (GL language geeklogs)
  • Added default picture

Version 0.2

  • Added support for Geeklog plugin “tags”. [Samuel Ken]
  • Added support for the “advanced editor”: FCKEditor [Gary Moncrieff]
  • Added support for categories. This is implemented similarly to the Geeklog lists plugin.
  • Added ability to selectively order product list
  • Added support for currencies beyond US Dollars. The plugin now supports any one currency that is also supported by Paypal.
  • Added support for encrypted postbacks to paypal for IPN verification, previously only unencrypted verification was supported.
  • Added ability to upgrade database from the install.php script in the /admin directory. Included upgrade instructions in docs/upgrade.
  • Added some additional Geeklog plugin API functions to functions.inc for a tighter integration of functionality.
  • The paypal plugin now supports purchases of quantity > 1. For digital items, purchasing more than one item doesn't get you anything more than a single purchase by default. This behavior can be overridden in IPN.class.php.
  • handleFailure function added to BaseIPN.class.php which is called in the case of a failure during processing. This can be overridden in IPN.class.php.
  • Created a function to generate button html (paypal_genButton), no interface as of yet
  • Marked required fields on product edit form and now check that all required fields are completed.
  • Removed 'COMMENT' fields from DDL to support older versions of MySQL
  • Fully support Anonymous purchases
  • Added option to send out email upon completed purchase, including option to attach purchased “downloads”
  • Made IPN.class.php extend BaseIPN.class.php so users could customize IPN.class.php without worrying about merging upgrades.
  • Required fields are now marked as such. SQL errors will no longer results when required fields are missing.
  • When pictures are specified, will use the CSS style display: none to hide image tags on user pages.
  • Added Google like pagination to the products page

Version 0.1.1

  • Added INSTALL instructions to fix bug in downloader.class.php for 1.3.11
  • Fixed typo in allowedextensions config option
  • Changed default paypal_url to www.paypal.com from www.sandbox.paypal.com
  • Fixed malformed sql string when txn_id specified in admin/purchase_history.php
  • Configuration option added to allow anonymous users to purchase - no email, no download currently available
  • Fixed bug that under strange condiitions showed download link instead of puchase buttons to logged in users

Version 0.1

  • Security improvements for anonymous users
  • No purchases necessary for free ($0.00) products
  • Minor template/documentation tweaks

Version 0.1rc1

  • Initial Rlease

Know issues

Todo

FEATURE REQUESTS

Is the Paypal plugin missing that one killer feature that you simply MUST have?

If you are a do it yourselfer, you can submit a patch. If accepted, patches will be incorporated into the main branch of the plugin and maintained by the developer (that's me).

Else you need to sumit this feature request to ::Ben on geeklog.net or geeklog.fr

Requested by Kobab on nov 28th 2011 :

1. to promote album (category) purchase rather than individual tunes, - 'add to cart button' at category enables all products in the subject category. - to set album (category) price lower sum of tunes prices if necessary

2. random block for category (album) not only for products (tunes)

3. built-in amazon mp3 like audio player

TODO – long term

  • Generate HTML for buttons from admin pages (donate, buy now, add to cart, subscribe)
  • Ability change/modify product id (aka SKU) item_id v1.2
  • Create geeklog Blocks for Products
    • Most popular products block
    • Most recently created/updated products block
    • Featured product block
  • Add (email) notification for purchasesv 1.2/errors
    • email admin (config configurable)
  • public_html
    • Product List by categories (similar to links)
  • admin (html)
    • Notification interface (email add/delete/modify)
    • Preview when editing products?
    • Upload files via web interface
  • Handle purchases of physical products (shipping, etc)
    • Support product status: order received, payment received, processing, shipped, etc.
  • Handle subscriptions v1.2
  • Multiple files available for download per product
    • Version control for downloads
  • Add access controls to products v1.2
  • Support Paypal's Website Payment Pro API?
  • functions.inc (potential)
    • plugin_showstats_paypal (stats!)
    • plugin_searchtypes_paypal/plugin_dopluginsearch_paypal (search!)
    • plugin_centerblock_paypal? (nice optional display for index page) See Usage#blocks above
    • plugin_whatsnew_paypal (show new products in whats new block)
  • Support user comments on products Support review v1.2. Need rating plugin 2.3.1
  • Replace paypal's shopping cart with one integrated into geeklog

Les payements récurrents (Recurring Payments)

Connecté en tant que : Guest (Guest)
plugins/paypal.txt · Dernière modification: 2012/01/19 18:09 par ::Ben
 

Download geeklog

Last version 1.8.1

Espace Membre





Devenir membre
Enregistrez-vous

Mot de passe oublié ?

Change language

Categories

  • Geeklog (38)
  • Plugins (53)
  • Thèmes (16)
  • My cart

    Votre panier (0 article)

    Votre panier est vide!

    0.00 EUR

    Visual Theme Switcher

    Test out available themes by selecting from one of the 6 available themes or give the Visual Switcher a try:

    Follow us on twitter

    En ligne

    Visiteurs: 8