Community Add-Ons
| Maintainers: | dynamoeffects |
PayPal Pro Direct Payments & Express Checkout
for osCommerce Online Merchant v2.2
This is a payment module for PayPal's Direct Payment and Express Checkout service that is fully compliant with their TOS. As stated in their TOS, Direct Payment is not a stand-alone product and must be used in conjunction with Express Checkout. You must offer both. Because of this, this module requires modification of several existing pages in your OSC installation.
Your store will be modified in the following ways:
-If a logged in customer clicks on "Checkout," they're taken to the shipping page with a "Paypal Express Checkout" button at the top. If they click on the "Express Checkout" button, they'll be taken to Paypal where they'll choose a shipping address and payment method, then be sent back to the checkout shipping page to choose a shipping method. From there, depending on your settings, it'll either go to checkout payment hiding the other payment options but displaying other modules, like CCGV, or to checkout confirmation to complete the order.
-If a visitor without an account, or someone who isn't logged in, clicks on "Checkout," they'll be taken to the login page where there are now three boxes. They can either use express pay, create an account, or login. If they use express pay, they'll be taken to Paypal where they'll choose a shipping address, then be sent back following the process above. If they're not a current customer, based on the information returned from Paypal, an account will automatically be created for them and the account details emailed to their email address. If they're an existing customer, they'll be logged in and their order will be added to their account.
-If they log in, or create an account, and go through the normal checkout process, then they can type in their credit card numbers and the direct payment API will charge their card transparently.
I had the opportunity to work in an extremely active osCommerce store where this module is installed and was able to work out many issues, both unknown and known.
* When using the refund feature in the admin, the refund amount is added to the order total list.
* Refund window in admin has been updated to be easy to understand.
* Now checks for missing code in the payment class and the ancient bug in checkout_process.php
* Now supports CCGV coupons with free shipping.
* Improved order total calculation code.
* Fixed htaccess files protecting the includes directory.
* Added missing credit card images and fixed .htaccess permission problems.
* IPN feature should function correctly now
* Improved error reporting.
* Fixed installation instructions in the readme and updated the wpp_diagnostics.php script.
Support Thread: http://forums.oscommerce.com/index.php?showtopic=174981&view=getnewpost
Features:
* Full Direct Payment and Express Checkout support.
* Issue refunds, capture funds, and charge cards from the admin.
* IPN support to manage refunds, charge backs, and e-checks.
* Set order status based on payment status.
* Full item list visible in your PayPal account for each order.
* Full CCGV support
Bug fixes in this version:
* Fixed path issues for stores located within directories.
* Error is now displayed if $order_totals bug is found in checkout_process.php
* The billing address now shows up every time for Express Checkout customers.
* wpp_diagnostics.php now correctly diagnoses a 1.0.0+ installation.
PLEASE NOTE: If you currently have a version lower than 1.0.0 installed and want to upgrade, you must first completely uninstall the previous version. Notes about how to do that are in the readme.
Support Thread: http://forums.oscommerce.com/index.php?showtopic=174981&view=getnewpost
This new version includes big changes and lots of new features.
* IPN support. Order statuses will be updated when PayPal sends notifications.
* Ability to issue refunds, capture funds, and charge cards from the admin.
* Improved error handling. Debug dumps now mask all sensitive information.
* Easier installation. The number of files that need to be modified have dropped from about 20 down to 11, and all modifications are minimal. The contribution is mostly contained in two folders and all operational code is stored within.
* Ability to disable Express Checkout (although you shouldn't use Direct Payment without it).
* Transaction information is no longer visible to the customer, but is displayed on the admin orders page.
* Ability to set order status based on payment status. If a payment is returned as "Pending" instead of "Completed," you can have the orders status set to a specific status. Likewise for "Refunded," "Reversed," and "Canceled" transactions.
* Fixed the quantity in order list bug.
* Express Checkout button can now be defined and located wherever you wish.
* Issue numbers are no longer required for Switch transactions.
* Purchasing free items that have shipping costs is now possible.
* New Read Me file with FULL INSTALLATION INSTRUCTIONS.
* Much much more, check the changelog.
PLEASE NOTE: If you're using an earlier version and want to upgrade, you must first completely uninstall the previous version. Notes about how to do that are in the readme.
Support Thread: http://forums.oscommerce.com/index.php?showtopic=174981&view=getnewpost
This is mainly a maintenance release, but here are the updates:
* Readded UK features since PayPal still supports it through the US API.
* Fixed the quantity in order list bug (Thanks to Glen aka Steve Dallas)
* Removed old unused code remnants
* Fixed a zone query bug that would return incorrect state abbreviations
* Updated the wpp_diagnostics file to correctly show curl errors and stop the test if any are encountered.
* Added the Express Checkout button on the shopping_cart.php page.
PLEASE STOP POSTING PAYPAL'S OFFICIAL VERSION HERE AND INSTEAD UPLOAD IT AS A NEW CONTRIBUTION IN ITS OWN SPACE.
Their official version is based off of 0.7.3 of this module, but the two forks are no longer anything alike so there's no reason to post it here other than to confuse users who don't know which one to use.
The problems with Switch / Maestro have been corrected in this release.
Zip file includes both the PWA version and non-PWA version
This release fixes a few bugs in 0.9. This module no longer works with UK merchants and all UK features have been removed.
* The cURL handle was getting closed too soon in the wpp_execute_transaction() function
* cc_validation.php is now called with require_once
* Limited the number of times to retry a transaction if PayPal returns 10207
* Removed "safeguard" feature remnants
* Transaction search should now return transaction ID
* All UK features have been removed.
If you have 0.9 installed, you'll need to remove the module in your admin, upload this new version, and then install it in your admin.
Version 0.9 Features:
- CCGV support
- Support for PayPal Pro UK (Switch/Solo cards)
- Additional currency support (AUD, CAD, EUR, GBP, JPY, USD) and currency conversions
- General bug fixes as listed in the changelog
If you are upgrading from 0.8.2, follow these instructions:
1) In your admin, go to Modules -> Payment -> PayPal Direct Payment and click on the "Remove" button.
2) Copy over the following files overwriting existing files:
a) /includes/modules/payment/paypal_wpp.php
b) /includes/languages/english/modules/payment/paypal_wpp.php
c) All files contained in /includes/wpp_xml/
3) In the admin, click on the "Install" button for PayPal Direct Payment and reinsert your settings.
For UK merchants, you'll also need to upload the included /includes/classes/cc_validation.php file for Switch/Solo support.
HIGHLY RECOMMENDED!
http://www.oscommerce.com/community/contributions,4006
Install this contribution as well and automate it with a cron job to run at least once a day. Now that this module does currency conversion, exchange rate data MUST be accurate, or else the totals may be incorrect.
Support thread: http://forums.oscommerce.com/index.php?showtopic=174981
---------------------------------------------------
Also note that PayPal's "official" versions are modified versions of v0.7.3 of this contribution and don't include many of the newer features added since then. If you use their contributions, support questions should be directed to them.
Downloaded from PayPal site 22nd Feb 07
Don't waste your time with this.
Credits cards work fine, but there is facility for Switch / Maestro payments
NOT a follow on from this excellent contrib - sorry for any confusion - this is the released (and by me at least, tested) contrib from PAYPAL themselves for the new UK PayPal PRO services.
Also available from PAYPAL dev network
As per rvsupply, here are the changes for Search Engine Safe URLs.
This needs a lot more testing, but it appears to work. It will allow the user to process the Paypal transaction using the displayed currency, as long as it is supported by the Paypal API.
The tax is coming out all wrong - so more work is needed there...
This VERY BETA release adds Switch/Solo card support as well as multi-currency support to support the UK users. It now, theoretically, supports all currencies and cards that PayPal accepts.
Don't forget the new cc_validation.php file included as well as the modified XML and language files.
THIS IS AN EXPERIMENTAL RELEASE! Do not install unless you want to help test the new CCGV support. If you want a stable release, use version 0.8.2 below.
This is a modification to the CCGV support included in the last beta and basically adds order total checking. It works like this:
1) Order item list is processed for the itemized total feature
2) If CCGV voucher/coupon variables are detected, it will add those as items to the item list and marked as such.
3) If the item total still doesn't match the order total, it will add an "Order Total Discrepancy" item to the item list seen on PayPal's site in the amount of the discrepancy. This should keep PayPal from generating errors if you're using a coupon contrib other than CCGV.
If you are willing to test this on your live/test site, I would appreciate it.
THIS IS AN EXPERIMENTAL RELEASE! Do not install unless you want to help test the new CCGV support. If you want a stable release, use version 0.8.2 below.
This version adds experimental CCGV support to the module. While specific CCGV support *shouldn't* be necessary, I did it anyway to retain the itemized order list feature. This will not work with anything except CCGV!
This was tested with the latest version of CCGV(trad), and the only problems I had were with CCGV itself not calculating the total correctly.
Post any bug reports to the support thread here:
http://forums.oscommerce.com/index.php?showtopic=174981
These are screenshots of the module in action. Taken with 0.8.2 installed.
This is the first version of my diagnostic script that will help to diagnose problems with your installation and even do a test transaction with PayPal if everything checks out. If this reports a success, but you're still having problems, it's most likely because you didn't fully integrate the code into your store. If it reports a failure, it'll be easier to detect what's going wrong.
After installing version 0.8.2 or above, place this script into your root store directory and then access it through your web browser by going to:
http://www.YOURWEBSITE.com/wpp_diagnostics.php
This is ONLY COMPATIBLE with versions 0.8.2 and above! From now on it will be included with the contribution package, but I wanted to get this out to help those who can use it.
First, this is a great contrib! Nice Work..
It's up to the programmer making this contrib to add it if they want...
Just a little suggestion I use on my store:
(Will add Month Number Before Month name where customer chooses exp date for card)
"01 - January"
Inside "/includes/modules/payment/paypal_wpp.php"
FIND:
for ($i=1; $i < 13; $i++) {
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));
}
Replace With:
for ($i=1; $i < 13; $i++) {
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%m - %B',mktime(0,0,0,$i,1,2000)));
}
There was a bug that would cause ExpressCheckout to fail in the previous version. You should update to this version.
Other changes:
* Fixed the total amount that's sent in the email when there's a failed transaction.
* Fixed the handling total error on ExpressCheckout
* You can now choose if you want to process their cards as a Sale or only Authorize them. (thanks to steveosc)
* Removed the "if shipping total is over $10000" check as it wouldn't avoid errors. Just don't ship anything that'll cost more than $10,000
If you have 0.8.1 installed, just uninstall the current module in the admin, upload the new one (/catalog/includes/modules/payment/paypal_wpp.php), install it, and reconfigure. No other files have been changed.w
This version sends additional order detail to PayPal during both Express Checkout and Direct Payment. Items ordered, shipping total, tax total, the customer's phone number and email are now displayed on the transaction page in your PayPal account. Screenshots have also been included so that you can see how this module will modify your store.
If you're upgrading from 0.8b, be sure to overwrite the following files:
/catalog/includes/modules/payment/paypal_wpp.php
/catalog/includes/languages/english/modules/payment/paypal_wpp.php
/catalog/includes/wpp_xml/doDirectPayment.xml
/catalog/includes/wpp_xml/doExpressCheckout.xml
This version is a major rewrite in that you no longer need the PEAR modules! Please note that this is a beta release, so don't use it unless you understand that there are probably bugs and you're willing to report any you encounter. Updates are as follows:
* I've reapplied the code changes to a virgin copy of 2.2MS2 Rev.060817 and those are the files that are included.
* PEAR modules have been replaced by a single 75 line function. Oh the joy. This should kill 90% of the problems people have with this module.
* Transaction search works correctly now.
* Changed some variable assignments so that it should work fine with register_globals = Off
* The README has been updated to be a little more helpful and note the contributions of others.
* A box has been added to the checkout_payment and checkout_shipping pages to allow a person checking out with Express Checkout to change his mind.
* AddressOverride works now.
* Fixed a few other small bugs I encountered along the way.
If you're upgrading, note that there's a new directory to upload:
/catalog/includes/wpp_xml/
Enjoy! Please report any bugs you find in the forum here:
http://forums.oscommerce.com/index.php?showtopic=174981
Fixed a small syntax error in 0.7.2.
Here's the changelog:
*Fixed the total amount in the email sent to the store owner when an order got declined.
*Implemented a shipping address bug fix by SteveDallas. It was treating the shipping and billing states as the same which would cause problems if they were different addresses.
*This should now work for those who have register_globals disabled
Since all of the major bugs seem to have been worked out in the last release, this tiny update fixes two small bugs in 0.7:
-If no shipping address is supplied, it won't send the shipping address fields to paypal which would generate an error. This would only crop up if you sell virtual products.
-Fixed the small logic error in checkout_payment.php that popped up all of the sudden.
If your installation is working fine, there's no big reason to upgrade.
This new version is extremely well rounded and thanks to some great debugging work by SteveDallas, this should be pretty stable. Please read the README.html file to make sure that you uninstall and reinstall the module correctly because some new database keys have been added since 0.5.
Here's the changelog:
*Transaction search has been thoroughly tested so, God willing, the payment without order problem should be fixed
*Error dumps that get emailed to the store admin are even more detailed. How exciting.
*If you have it setup in your PayPal account, Express Checkout will now return the customer's telephone number (Thanks to Glen aka Steve Dallas)
*PayPal will sometimes return more than one error message. Now they're ALL displayed to the customer
*Shipping address is now sent to PayPal (Thanks to WillBrand)
*I stripped out a lot of the contributed code because it was unnecessary and caused more problems than it solved. (I appreciate it, though)
*International support has been improved (Thanks to Glen aka SteveDallas)
*Debugging variable bug fixed (heh)
*You can now override the shipping address sent back from PayPal (for Stew's gift address support) but it's not working right just yet.
(The title change above is to help with search listings since many people apparently can't find this one)
PLEASE NOTE THAT THIS IS A BETA RELEASE!
This version fixes the installation problem with 0.6b.
This version adds transaction search support so that when PayPal returns a blank response, it'll do a transaction search to see if the transaction succeeded or not. This should cut down on the number of payments without orders. This is a beta release to test its effectiveness. Please do not upgrade to this version if you are not willing to help me test this out.
This is a full package, but the only file changed between 0.5 and this version is the actual payment module: /catalog/includes/modules/payment/paypal_wpp.php
and the README file.
Use the README for instructions on how to update your module!!
PLEASE NOTE THAT THIS IS A BETA RELEASE!
This version adds transaction search support so that when PayPal returns a blank response, it'll do a transaction search to see if the transaction succeeded or not. This should cut down on the number of payments without orders. This is a beta release to test its effectiveness. Please do not upgrade to this version if you are not willing to help me test this out.
This is a full package, but the only file changed between 0.5 and this version is the actual payment module: /catalog/includes/modules/payment/paypal_wpp.php
and the README file.
Use the README for instructions on how to update your module!!
If you have a previous version installed, you can just overwrite this file without removing/readding the module:
/catalog/includes/modules/payment/paypal_wpp.php
Updates in this version:
*Fixed bug that would tell the customer the card's declined, but charge it anyway
*TransactionIDs (EC & DP) and AVS/CVV2 (DP only) return codes are recorded properly
*Fixed Javascript bug so that it'll properly check the fields
*Returned errors now include the ShortMessage
*Added debug variable that, when set to '1', will email the store owner a var_dump of paypal's return msg
*Card holder's information is properly recorded in the order
This is the same as 0.3, but I actually included the 0.2 patch in this one.
*The CVV2 box now allows 4 characters to accomodate AMEX cards.
*Changed some code to allow you to display whatever text you want under "Payment Method" on checkout_confirmation.php
*Displaying the Express Checkout button on the payment page is optional
*If the user hits cancel in PayPal, it'll properly unregister the variables letting them use another form of payment
*If a logged in user clicks "Express Checkout," then hits the back button, the shipping address won't show up as NULL
*You can now store the API certificate wherever you please
This also includes the fix included in the 0.2 patch.
Whoops, small error in create_account.php. THIS IS ONLY A PATCH, NOT A FULL PACKAGE.
Use the create_account.php contained in this zip to overwrite or modify your existing create_account.php.
Many many bugfixes and feature additions. This version now displays the error messages returned from PayPal, automatic account creation is now optional (it still creates a temporary account, but gets deleted at the end of checkout), and much more. Read the changelog in the README.txt file to see what's been updated.
Many files have been added and modified (the zip file is 20k larger than the first version's), so if you installed 0.1, you'll need to go through the OSC core files you modified and redo them. Sorry about that, but it's necessary and the updates in this version are worth it.
These are the pear modules you'll need for this payment module. Download these only if you don't want to or can't install pear modules on your server. Extract these into your catalog folder so that it looks like:
/catalog/pear/
And then edit the pear location path in the module's settings. (If you remove and readd the module, it'll automatically find it if you put it in the right place)
YOU NEED BOTH OF THESE PEAR MODULE PACKAGES! I broke it up over 2 files to stay under the 300k limit.
These are the pear modules you'll need for this payment module. Download these only if you don't want to or can't install pear modules on your server. Extract these into your catalog folder so that it looks like:
/catalog/pear/
And then edit the pear location path in the module's settings. (If you remove and readd the module, it'll automatically find it if you put it in the right place)
YOU NEED BOTH OF THESE PEAR MODULE PACKAGES! I broke it up over 2 files to stay under the 300k limit.
This is a payment module for PayPal's Direct Payment and Express Checkout service that is fully compliant with their TOS. As stated in their TOS, Direct Payment is not a stand-alone product and must be used in conjunction with Express Checkout. You must offer both. Because of this, this module requires modification of several existing pages in your OSC installation.
Your store will be modified in the following ways:
-If a logged in customer clicks on "Checkout," they're taken to the shipping page with a "Paypal Express Checkout" button at the top. If they click on the "Express Checkout" button, they'll be taken to Paypal where they'll choose a shipping address and payment method, then be sent back to the checkout shipping page to choose a shipping method. From there, depending on your settings, it'll either go to checkout payment hiding the other payment options but displaying other modules, like CCGV, or to checkout confirmation to complete the order.
-If a visitor without an account, or someone who isn't logged in, clicks on "Checkout," they'll be taken to the login page where there are now three boxes. They can either use express pay, create an account, or login. If they use express pay, they'll be taken to Paypal where they'll choose a shipping address, then be sent back following the process above. If they're not a current customer, based on the information returned from Paypal, an account will automatically be created for them and the account details emailed to their email address. If they're an existing customer, they'll be logged in and their order will be added to their account.
-If they log in, or create an account, and go through the normal checkout process, then they can type in their credit card numbers and the direct payment API will charge their card transparently.
