PayPal Transaction record does not get inserted in database
-
Hello,
I am using WordPress4.8 and simple membership plugin (3.5.9).
But the problem I am facing is that when using “PayPal Buy Now” payment button, payment is successful in sandbox mode, but when come back to the site it still shows the But with Paypal button.
I check and the record does not get inserted in transaction list and every time table shows empty record.Any help would be appreciated.
Thanks,
AdityaThe page I need help with: [log in to see the link]
-
Hi, are you testing in Sandbox mode or live mode?
Can you further explain the following comment.
but when come back to the site it still shows the But with Paypal button.
Thank you
Hello,
I am testing in sandbox mode.but when come back to the site it still shows the But with Paypal button.
This means I show a “Buy with Paypal” button on the page. But when purchase is made and the user is redirected back to this page, it still shows the “Buy with Paypal”. I check in the database and the record did not get inserted in the transaction list.
Here’s the link: https://culinary-concepts.co.uk/NEW2016/biscuit-cakes-sponges/
TEST LOGIN:
username: falcon
pwd: Aditya@12345Thank you
Hi, can you carry out a live purchase. This will then reveal to you if it is working or not. I am almost certain the live purchase will work. Sandbox testing is very tricky and many run into issues.
Let me know how you go.
Regards
Hi,
I just did a few live purchases.
The entry is made in the transaction table but somehow I am not able to get the wordpress user id in"save_txn_record"
function. So I am not able to map the paypal purchase record.Here is my workaround for the same:
global $wpdb; $query = "SELECT <code>email</code> FROM <code>wp_swpm_members_tbl</code> WHERE member_id = " . $custom_var['swpm_id']; $results = $wpdb->get_results($query); $email = ''; for ($i = 0; $i < sizeof($results); $i++) { $email = $results[$i]->email; }
But this doesn’t work.
Any assistance would be highly appreciated.Thank you
-
This reply was modified 7 years, 2 months ago by
aditya.neel09.
Hi, can you try the following documentation. Let me know if this helps you.
There are a few more checks you can carry out before I go testing your registration, as you mentioned above.
Thank you
Hi,
I referred to the documentation but that didn’t help.
Here’s the log from the live paypal transaction:[12/12/2017 8:46 AM] - SUCCESS: Paypal Class Initiated by 173.0.81.1 [12/12/2017 8:46 AM] - SUCCESS: Post string : transaction_subject=&payment_date=23%3A21%3A01+Dec+11%2C+2017+PST&txn_type=web_accept&last_name=neelkanth&residence_country=IN&item_name=Hot+Cold+Desserts&payment_gross=&mc_currency=£ (entire paypal transaction chain) [12/12/2017 8:46 AM] - SUCCESS: Checking if PayPal IPN response is valid [12/12/2017 8:46 AM] - SUCCESS: Connecting to: https://www.paypal.com/cgi-bin/webscr [12/12/2017 8:46 AM] - SUCCESS: IPN successfully verified. [12/12/2017 8:46 AM] - SUCCESS: Creating product Information to send. [12/12/2017 8:46 AM] - SUCCESS: Transaction Type: Buy Now/Subscribe [12/12/2017 8:46 AM] - SUCCESS: Item Number: 307 [12/12/2017 8:46 AM] - SUCCESS: Item Name: Hot Cold Desserts [12/12/2017 8:46 AM] - SUCCESS: Item Quantity: 1 [12/12/2017 8:46 AM] - SUCCESS: Item Total: 0.01 [12/12/2017 8:46 AM] - SUCCESS: Item Currency: GBP [12/12/2017 8:46 AM] - SUCCESS: Membership payment paid for membership level ID: 3 [12/12/2017 8:46 AM] - SUCCESS: Transaction type: web_accept. Creating member account... [12/12/2017 8:46 AM] - SUCCESS: swpm_handle_subsc_signup_stand_alone(). Custom value: subsc_ref=3&user_ip=49.213.60.251, Unique reference: 9NW651769B116841E [12/12/2017 8:46 AM] - SUCCESS: Found a match in the member database. Member ID: 5 [12/12/2017 8:46 AM] - SUCCESS: Modifying the existing membership profile... Member ID: 5 [12/12/2017 8:46 AM] - SUCCESS: Setting access starts date value to: 2017-12-12 [12/12/2017 8:46 AM] - SUCCESS: Updating the current membership level (3) of this member to the newly paid level (3) [12/12/2017 8:46 AM] - SUCCESS: Member signup/upgrade completion email successfully sent to: [email protected] [12/12/2017 8:46 AM] - SUCCESS: Saving transaction data to the database table. [12/12/2017 8:46 AM] - SUCCESS: Transaction data saved. [12/12/2017 8:46 AM] - SUCCESS: Paypal class finished.
But as you can see from the logs, I am not able to get the
swpm_id
$customvariables['swpm_id']
Thanks.
Hi, I have submitted a message to the developers to investigate further your issue.
Thank you
Thank you very much.
Hoping for a positive response.Have you done the following in your paypal account just to be sure?
https://simple-membership-plugin.com/setting-utf-8-formatting-for-your-paypal-ipn-messages/Hi,
Yes I tried the paypal utf8 formatting but still of no use.
Also, the recipient paypal email used belongs to the UK so I think that wouldn’t be an issue.Thanks
This is a little strange. Do you get any server error in the error log file?
Hi,
There seems to be no error in the log file:[12/13/2017 6:49 AM] - SUCCESS: Paypal Class Initiated by 173.0.81.1 [12/13/2017 6:49 AM] - SUCCESS: Post string : transaction_subject=&payment_date=22%3A49%3A08+Dec+12%2C+2017+PST&txn_type=web_accept&last_name=neelkanth&residence_country=IN&item_name=Hot+Cold+Desserts&payment_gross=&mc_currency=GBP&business=david%40dnewton.net&payment_type=instant&protection_eligibility=Ineligible&verify_sign=APXA2hlQD4stQ9Mpl5BvVscKMBxzAx-q19b1ORMtMduPZ3onrHTjp7vj&payer_status=verified&payer_email=contact%40falconsolutions.co&txn_id=7WN18878BE058251J&quantity=1&receiver_email=david%40dnewton.net&first_name=aditya&payer_id=52HLDLH5RSWKL&receiver_id=XKZCM7LAY2FRY&item_number=307&payer_business_name=FALCON+SOLUTIONS&payment_status=Completed&payment_fee=&mc_fee=0.01&mc_gross=0.01&custom=subsc_ref%253D3%2526user_ip%253D49.213.60.105&charset=windows-1252¬ify_version=3.8&ipn_track_id=e4e913bfd79d3& [12/13/2017 6:49 AM] - SUCCESS: Checking if PayPal IPN response is valid [12/13/2017 6:49 AM] - SUCCESS: Connecting to: https://www.paypal.com/cgi-bin/webscr [12/13/2017 6:49 AM] - SUCCESS: IPN successfully verified. [12/13/2017 6:49 AM] - SUCCESS: Creating product Information to send. [12/13/2017 6:49 AM] - SUCCESS: Transaction Type: Buy Now/Subscribe [12/13/2017 6:49 AM] - SUCCESS: Item Number: 307 [12/13/2017 6:49 AM] - SUCCESS: Item Name: Hot Cold Desserts [12/13/2017 6:49 AM] - SUCCESS: Item Quantity: 1 [12/13/2017 6:49 AM] - SUCCESS: Item Total: 0.01 [12/13/2017 6:49 AM] - SUCCESS: Item Currency: GBP [12/13/2017 6:49 AM] - SUCCESS: Membership payment paid for membership level ID: 3 [12/13/2017 6:49 AM] - SUCCESS: Member ID: [12/13/2017 6:49 AM] - SUCCESS: Transaction type: web_accept. Creating member account... [12/13/2017 6:49 AM] - SUCCESS: swpm_handle_subsc_signup_stand_alone(). Custom value: subsc_ref=3&user_ip=49.213.60.105, Unique reference: 7WN18878BE058251J [12/13/2017 6:49 AM] - SUCCESS: Found a match in the member database. Member ID: 5 [12/13/2017 6:49 AM] - SUCCESS: Modifying the existing membership profile... Member ID: 5 [12/13/2017 6:49 AM] - SUCCESS: Setting access starts date value to: 2017-12-13 [12/13/2017 6:49 AM] - SUCCESS: Updating the current membership level (3) of this member to the newly paid level (3) [12/13/2017 6:49 AM] - SUCCESS: Member signup/upgrade completion email successfully sent to: [email protected] [12/13/2017 6:49 AM] - SUCCESS: Saving transaction data to the database table. [12/13/2017 6:49 AM] - SUCCESS: Transaction data saved. [12/13/2017 6:49 AM] - SUCCESS: Paypal class finished.
I meant your server’s error log file (not the plugin’s log file). Sometimes when the Database insert fails, the server’s error log file will have details as to why the insert failed.
Hi,
Here’s a part of the log:"https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=307&button_type=pp_buy_now" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:46:59 +0000] "POST /NEW2016/wp-admin/options.php HTTP/1.1" 302 - "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_settings" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:47:01 +0000] "GET /NEW2016/wp-admin/admin.php?page=simple_wp_membership_settings&settings-updated=true HTTP/1.1" 200 99798 "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_settings" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:47:08 +0000] "GET /NEW2016/hot-cold-desserts/ HTTP/1.1" 200 60950 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" 49.213.60.105 - - [13/Dec/2017:06:47:25 +0000] "POST /NEW2016/wp-admin/admin-ajax.php HTTP/1.1" 200 47 "https://culinary-concepts.co.uk/NEW2016/wp-admin/user-edit.php?user_id=10&wp_http_referer=%2FNEW2016%2Fwp-admin%2Fusers.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:47:28 +0000] "GET /NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments HTTP/1.1" 200 168397 "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_settings" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:47:32 +0000] "GET /NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments&tab=payment_buttons HTTP/1.1" 200 102700 "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:47:36 +0000] "GET /NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=307&button_type=pp_buy_now HTTP/1.1" 200 101503 "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments&tab=payment_buttons" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:47:45 +0000] "POST /NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=307&button_type=pp_buy_now HTTP/1.1" 200 101590 "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=307&button_type=pp_buy_now" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:48:05 +0000] "GET /NEW2016/hot-cold-desserts/ HTTP/1.1" 200 60944 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" 49.213.60.105 - - [13/Dec/2017:06:48:48 +0000] "POST /NEW2016/wp-admin/admin-ajax.php HTTP/1.1" 200 47 "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_payments&tab=edit_button&button_id=307&button_type=pp_buy_now" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:49:11 +0000] "GET /NEW2016/hot-cold-desserts/ HTTP/1.1" 200 60944 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" 49.213.60.105 - - [13/Dec/2017:06:49:13 +0000] "GET /NEW2016/wp-content/plugins/simple-membership/log.txt HTTP/1.1" 200 11906 "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_settings" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:49:14 +0000] "GET /favicon.ico HTTP/1.1" 404 - "https://culinary-concepts.co.uk/NEW2016/wp-content/plugins/simple-membership/log.txt" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 173.0.81.1 - - [13/Dec/2017:06:49:13 +0000] "POST /NEW2016/?swpm_process_ipn=1 HTTP/1.1" 200 66 "-" "PayPal IPN ( https://www.paypal.com/ipn )" 49.213.60.105 - - [13/Dec/2017:06:49:26 +0000] "POST /NEW2016/wp-admin/admin-ajax.php HTTP/1.1" 200 47 "https://culinary-concepts.co.uk/NEW2016/wp-admin/user-edit.php?user_id=10&wp_http_referer=%2FNEW2016%2Fwp-admin%2Fusers.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:49:29 +0000] "GET /NEW2016/wp-content/plugins/simple-membership/log.txt HTTP/1.1" 200 14535 "https://culinary-concepts.co.uk/NEW2016/wp-admin/admin.php?page=simple_wp_membership_settings" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:49:29 +0000] "GET /favicon.ico HTTP/1.1" 404 - "https://culinary-concepts.co.uk/NEW2016/wp-content/plugins/simple-membership/log.txt" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" 49.213.60.105 - - [13/Dec/2017:06:49:44 +0000] "GET /NEW2016/wp-content/plugins/simple-membership/css/swpm.common.css HTTP/1.1" 200 3484
Don’t see anything wrong in here.
Thanks -
This reply was modified 7 years, 2 months ago by
- The topic ‘PayPal Transaction record does not get inserted in database’ is closed to new replies.