WP e-Commerce v3.7.6.9 (the latest stable version available, downloaded Sept 18, 2010)
WordPress v3.0.1
Testing done in PayPal Sandbox & on live site (once Sandbox testing proved successful)
Themes tested: 1) WP Twenty Ten 1.1; 2) Thematic 0.9.6.2; 3) Thematic Feature Site 1.0.1 child theme
Problems: after making a PayPal or credit card purchase I get the wrong messages/emails notifications:
- Incorrect Transaction Results page: shows “Order Pending: Payment Required” message after making a purchase with PayPal or credit card. The Transaction Results page should show “The Transaction was successful” text.
- Incorrect email notification: After a PayPal or credit card purchase, the customer should receive a “Purchase Receipt” email confirmation. But instead, they incorrectly receive an “Order Pending: Payment Required” email.
- Incorrect Sales status: shows “Order Received” in WP e-Commerce’s back-end. The Sales status should read “Accepted Payment,” because the customer paid with PayPal or a credit card.
WP e-Commerce settings: Store > Settings > Payment Options:
- Payment Gateway: Paypal Payments Standard
- IPN: Yes
- Send shipping details: Off
- Shipping override: Off
PayPal settings: Nothing changed; I kept all of the default settings: IPN is off, no return page.
Solution 1 of 3: Go to wp-e-commerce/merchants/paypal_multiple.php
Find the following lines:
- Line 241:
if(get_option('paypal_ipn') == 0) { // A setting of 0 ensures that digital downloads still work for people without IPN, but it's less secure.
- Line 242:
//$wpdb->query("UPDATE `".WPSC_TABLE_PURCHASE_LOGS."` SET `processed` = '2' WHERE `sessionid` = ".$sessionid." LIMIT 1");
Change to:
- Line 241:
if(get_option('paypal_ipn') == 1) { // Setting to 1 allows the Successful Transaction to be displayed on the Transaction Results page. A setting of 0 ensures that digital downloads still work for people without IPN, but it's less secure.
- Line 242:
$wpdb->query("UPDATE `".WPSC_TABLE_PURCHASE_LOGS."` SET `processed` = '2' WHERE `sessionid` = ".$sessionid." LIMIT 1");
What I did:
- Changed get_option value from 0 to 1 at line 241
- Deleted // at the beginning of line 242
Solution 2 of 3 (this step may no longer be necessary. Make a test PayPal Sandbox purchase with just Solution #1 above before making this 2nd Solution edit.): Go to wp-e-commerce/function_results.php
Find the following line:
Line 40: }elseif($sessionid == ''){
Change to:
Line 40: }if($sessionid == ''){
What I did:
- Deleted “else” from the elseif statement
Solution 3 of 3 (this step may no longer be necessary. Make a test PayPal Sandbox purchase with just Solutions #1 & #2 above before making this 3rd Solution edit.): Go to wp-e-commerce/wpsc-admin/ajax-and-init.php
Find the following line:
Line 1337: transaction_results($log_data['sessionid'],false);
Change to:
Line 1337: transaction_results($log_data['sessionid'],true);
What I did:
- Changed “false” to “true”
NOTE: These changes may affect digital purchases/downloads from working properly. Your setup may be different from mine.
TEST RESULTS (using PayPal Sandbox & live site):
PayPal payment results – GOOD:
- Transaction Results page: The Transaction was successful – GOOD
- Customer receives correct “Purchase Receipt” email notification – GOOD
- Sales section in WP e-Commerce shows correctly as “Accepted Payment” – GOOD
Credit Card payment results – GOOD:
- Transaction Results page: The Transaction was successful – GOOD
- Customer receives correct “Purchase Receipt” email notification – GOOD
- Sales section in WP e-Commerce shows correctly as “Accepted Payment” – GOOD
Manual payment results – GOOD:
- Transaction Results page: Purchase is pending – GOOD
- Customer receives correct “Order Pending” email notification – GOOD
- Sales section in WP e-Commerce shows correctly as “Order Received” – GOOD