WC Paypal Transaction Cancelled – Sending Payment Completed Notification
-
Something strange happening on two sites running WC. When any product is added to the cart and carried through to Paypal, we log into Paypal, then cancel the transaction prior to payment, WC is sending a ‘payment completed’ notification to our membership app, which sends a welcome message immediately, after which WC processes the cancellation. So folks who cancel their purchase are receiving the welcome message with their login info (they can’t log in, as our membership settings won’t allow it after cancellation) – it’s creating confusion. We’ve been working with the membership app developer to get it resolved, but they have determined it’s a WC issue. Wondering if we’re missing something.
-
Are you using the built-in PayPal standard gateway, or some other version of it?
> When any product is added to the cart and carried through to Paypal, we log into Paypal, then cancel the transaction prior to payment,
I’m not sure I understand the logic here, are you saying that the following happens:
1. user add products to cart
2. users checks out and pays via PayPal
3. you log into to PayPal to “cancel the transaction prior to payment”Step 3 isn’t clear to me, or I’m misunderstanding it… could you explain further please?
> We’ve been working with the membership app developer to get it resolved, but they have determined it’s a WC issue.
Do you have more details here that you could share? Logs or relevant code that they’ve mentioned could be at fault?
Thanks so much for pondering this… ?? Yes, the standard Woocommerce/PP integration. To clarify:
1. User adds product to cart.
2. User checks out to the point of logging in to Paypal.
3. User changes their mind and cancels the purchase prior to completing the transaction.I have the log from a test – essentially what happens is WC is showing the transaction as ‘completed’ then marks it as ‘cancelled’, so the membership software is triggered to release the welcome message (even if, as noted the person doesn’t get access to the product due to the rules we have set up for cancelled orders). Here’s the test log with any private info redacted:
2017-12-29T09:17:02-08:00 INFO Generating payment form for order 7680. Notify URL: https://www.aiminghigherconsultants.com/wc-api/WC_Gateway_Paypal/ 2017-12-29T09:17:02-08:00 INFO PayPal Request Args for order 7680: cmd=_cart&business=xxxxxx%40gmail.com&no_note=1¤cy_code=USD&charset=utf-8&rm=2&upload=1&return=https%3A%2F%2Fwww.aiminghigherconsultants.com%2Fcheckout-2%2Forder-received%2F7680%3Fkey%3Dwc_order_xxxxxx%26utm_nooverride%3D1&cancel_return=https%3A%2F%2Fwww.aiminghigherconsultants.com%2Fcart%2F%3Fcancel_order%3Dtrue%26order%3Dwc_order_xxxxxx%26order_id%xxxxxx%26redirect%26_wpnonce%3D40f7506b99&page_style=&image_url=&paymentaction=sale&bn=WooThemes_Cart&invoice=WC-7680&custom=%7B%22order_id%xxxxxx%22order_key%22%3A%22wc_order_xxxxxx%22%7D¬ify_url=https%3A%2F%2Fwww.aiminghigherconsultants.com%2Fwc-api%2FWC_Gateway_Paypal%2F&first_name=xxxxxx&last_name=xxxxxx&address1=xxxxxx+xxxxxx+Road&address2=&city=xxxxxx&state=xxxxxx&zip=xxxxxx&country=xxxxxx&email=xxxxxx%40gmail.com&night_phone_a=604&night_phone_b=xxxxxx&night_phone_c=xxxxxx&no_shipping=1&tax_cart=0.00&item_name_1=Parenting+for+Excellence&quantity_1=1&amount_1=197&item_number_1= ______ 2017-12-29 18:18:05:loadUsersDisplaySortedHTML : field=, sortorder=desc 2017-12-29 18:18:05:loadUsersDisplaySortedHTML : prod status=All 2017-12-29 18:18:05:userSearchType: email 2017-12-29 18:18:05:USER LIST SIZE=0 <strong>2017-12-29 18:18:27:DAP-WP-LiveLinks.php:processWCSubscriptionPayment(): ENTER... order_id=7680, order_status=completed</strong> 2017-12-29 18:18:27:DAP-WP-LiveLinks.php:processPayment(): ENTER... completed, 7680 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment(): paymentType=FIRST_PAYMENT 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment() DATA: completed, 7680, FIRST_PAYMENT, ,, 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment():FIRST_PAYMENT: ORDER STATUS=completed 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment():, , , 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment():FIRST_PAYMENT: order_id=7680 2017-12-29 18:18:27:DAP-WP-Livelinks.php:processSuccessfulWCPayment(): count of number of items=1 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment(): paymentType=FIRST_PAYMENT 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment(): mc_gross=197 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment(): FIRST_PAYMENT, name=, qty=, final price=197, currency=USD 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment(): FIRST_PAYMENT, virtual product=true 2017-12-29 18:18:27:processWCPayment 2017-12-29 18:18:27:INCOMING:Array 2017-12-29 18:18:27:27 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=txn_id, Value=7680-1 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=mc_currency, Value=USD 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=txn_type, Value=CART 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=payment_status, Value=Completed 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=payment_processor, Value=WCOM 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=payer_email, Value=vgazeley%40gmail.com 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=email, Value=vgazeley%40gmail.com 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=first_name, Value=xxxxxx 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=last_name, Value=xxxxxx 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=address1, Value= 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=address2, Value= 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=city, Value= 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=country, Value= 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=state, Value= 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=zip, Value= 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=phone, Value=xxxxxx 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=item_name, Value=Parenting+for+Excellence 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=mc_gross, Value=197 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Key=item_number, Value=27 2017-12-29 18:18:27:record transaction:&txn_id=7680-1&mc_currency=USD&txn_type=CART&payment_status=Completed&payment_processor=WCOM&payer_email=xxxxxx%40gmail.com&email=xxxxxx%40gmail.com&first_name=xxxxxx&last_nam 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): USERID NOT FOUND= 2017-12-29 18:18:27:Dap_Transactions:create(). SQL:INSERT into dap_transactions (trans_num, trans_type, payment_status, payment_currency, payment_value, payer_ 2017-12-29 18:18:27:Dap_Transactions:create(). Insert into transactions Done.. 2017-12-29 18:18:27:Dap_IPNProcessor::recordIncoming(): Insert into transactions Done. Returning transaction id: 1011 2017-12-29 18:18:27:Sending Payment Notification Email 2017-12-29 18:18:27:getAdminEmail: Admin Email in config: xxxxxx 2017-12-29 18:18:27:getAdminEmail: Admin Email in config: xxxxxx 2017-12-29 18:18:27:loadUserByEmail: email=xxxxxx 2017-12-29 18:18:27:functions_email.php: occurences=0 2017-12-29 18:18:27:getAdminEmail: Admin Email in config: xxxxxx 2017-12-29 18:18:27:Sending email From: xxxxxx , To: xxxxxx, Subject: [DAP] Payment Received. Processor: WCOM, Body: This is notification of Payment into DAP 2017-12-29 18:18:27:in sendEmail: SMTPServer: Local_Web_Host, Batch Size: 144 2017-12-29 18:18:27:dap-woocommerce.php: FIRST_PAYMENT: recorded incoming. id:1011 2017-12-29 18:18:27:dap-woocommerce.php: FIRST_PAYMENT Recorded incoming . id:1011 2017-12-29 18:18:27:Dap_Transactions::setRecordStatus init..Record Id: 1011, Status: 1 2017-12-29 18:18:27:Processing Transaction With ID:1011 2017-12-29 18:18:27:select * from dap_transactions where id =:id and status = 1 and payment_status in ('Completed', 'Refund') and trans_type != 'subscr_signup' 2017-12-29 18:18:27:loadVerifiedPaypalTransaction:Returning Transaction:1011 2017-12-29 18:18:27:Dap_Transactions::processTransaction Product Price:197.00: Transaction Payment Amount:197.00 2017-12-29 18:18:27:loadUserByEmail: [email protected] 2017-12-29 18:18:27:Dap_Transactions::processTransaction :load user by their paypal email 2017-12-29 18:18:27:Dap_Transactions::processTransaction :CheckingUser: New User 2017-12-29 18:18:27:Dap_Transactions::processTransaction :TransBlob&txn_id=xxxxxx-1&mc_currency=USD&txn_type=CART&payment_status=Completed&payment_processor=WCOM&payer_email=xxxxxx%40gmail.com&email=xxxxxx%40gmail.com& 2017-12-29 18:18:27:Dap_Transactions::processTransaction :CheckingUser: New User, FirstName:xxxxxx: 2017-12-29 18:18:27:address_street: 2017-12-29 18:18:27:city: 2017-12-29 18:18:27:state: 2017-12-29 18:18:27:zip: 2017-12-29 18:18:27:state: 2017-12-29 18:18:27:phone: xxxxxx 2017-12-29 18:18:27:Dap_Transactions::processTransaction: : generateUsername(): 0, try option=1 2017-12-29 18:18:27:Dap_Transactions::processTransaction: : generateUsername():xxxxxx 2017-12-29 18:18:27:Dap_Transactions::processTransaction: : generateUsername(): 1, try option=2 2017-12-29 18:18:27:Dap_Transactions::processTransaction: : generateUsername():xxxxxx 2017-12-29 18:18:27:Dap_Transactions::processTransaction: : generateUsername(): username=username generated successfully using 2 2017-12-29 18:18:27:Dap_Transactions::processTransaction: username set toxxxxxx 2017-12-29 18:18:27:(Dap_User.create()) New User Create. FirstName:xxxxxx 2017-12-29 18:18:27:Dap_Transactions::processTransaction :NewUser: UID:523 2017-12-29 18:18:27:loadUserByEmail: [email protected] 2017-12-29 18:18:27:address1 after re-read: 2017-12-29 18:18:27:Dap_UsersProducts.class.php: addProductToUser() 2017-12-29 18:18:27:(Dap_UsersProducts.addProductToUser()) couponId= 2017-12-29 18:18:27:(Dap_UsersProducts.addProductToUser()) accessEndDate= 2017-12-29 18:18:27:(Dap_UsersProducts.userproduct create 2017-12-29 18:18:27:newdate= 2017-12-29 18:18:27:currdate=1514534400 2017-12-29 18:18:27:This is single optin 2017-12-29 18:18:27:Sending UserProduct Notification Email 2017-12-29 18:18:27:functions_email.php: occurences=0 2017-12-29 18:18:27:getAdminEmail: Admin Email in config: xxxxxx 2017-12-29 18:18:27:functions_email.php: occurences=0 2017-12-29 18:18:27:getAdminEmail: Admin Email in config: xxxxxx 2017-12-29 18:18:27:getAdminEmail: Admin Email in config: xxxxxx 2017-12-29 18:18:27:loadUserByEmail: [email protected] 2017-12-29 18:18:27:functions_email.php: occurences=0 2017-12-29 18:18:27:getAdminEmail: Admin Email in config: xxxxxx 2017-12-29 18:18:27:Sending email From: xxxxxx , To: xxxxxx, Subject: [Jeannette Webb] Your Order of Parenting for Excellence Class, Body: Dear xxxxxx: Thank you for purchasing... 2017-12-29 18:18:27:in sendEmail: SMTPServer: Local_Web_Host, Batch Size: 144 2017-12-29 18:18:27:Sent UserProduct Welcome Email To: xxxxxx 2017-12-29 18:18:27:Sending UserProduct Notification Email 2017-12-29 18:18:27:Sending email From-Name: xxxxxx, From-Email: xxxxxx, To: xxxxxx, Subject: New User Signup (3rd Party Notification), Body: Name: xxxxxx Email: xxxxxx 2017-12-29 18:18:27:getAdminEmail: Admin Email in config: xxxxxx 2017-12-29 18:18:27:loadUserByEmail: email=xxxxxx 2017-12-29 18:18:27:Sending email From: xxxxxx , To: xxxxxx, Subject: New User Signup (3rd Party Notification), Body: Name: xxxxxx Email: xxxxxx Prod 2017-12-29 18:18:27:in sendEmail: SMTPServer: Local_Web_Host, Batch Size: 144 2017-12-29 18:18:27:Dap_UsersProducts.class.php: addUsersProducts(): EXITING 2017-12-29 18:18:27:source_operation=AT 2017-12-29 18:18:27:Dap_UsersProducts.class.php: addUsersProducts(): READY FOR VB, productName=Parenting for Excellence 2017-12-29 18:18:27:Dap_UsersProducts.addUsersProducts(): load before exit: userId=523, productId=27 2017-12-29 18:18:27:Dap_UsersProducts.addUsersProducts(): USERPROUCTSTATUS=A 2017-12-29 18:18:27:(Dap_UsersProducts.addUsersProducts()) SUCCESS 2017-12-29 18:18:27:added new user to products association 1 2017-12-29 18:18:27:Dap_Transactions::setRecordStatus init..Record Id: 1011, Status: 5 2017-12-29 18:18:27:loadUserByEmail: email=xxxxxx 2017-12-29 18:18:27:dap-woocommerce.php: FIRST_PAYMENT user=xxxxxx all set. SUCCESS1011 2017-12-29 18:18:27:dap-woocommerce.php:processSuccessfulWCPayment(): virtual order, FIRST_PAYMENT, mark as completed 2017-12-29 18:18:27:DAP-WP-LiveLinks.php:processPayment(): EXIT... , 2017-12-29 18:18:27:DAP-WP-LiveLinks.php:processWCSubscriptionPayment(): EXIT 2017-12-29 18:18:28:DAP-WP-LiveLinks.php:dap_woocommerce_order_status_cancelled(): ENTER... order_id=7680, order_status= 2017-12-29 18:18:28:dap-woocommerce.php: processWCOrderCancellation(): ENTER 2017-12-29 18:18:28:dap-woocommerce.php: processWCOrderCancellation(): item_name=Parenting for Excellence 2017-12-29 18:18:28:dap-woocommerce.php: processWCOrderCancellation(): user [email protected] 2017-12-29 18:18:28:DAP-WP-Livelinks.dap_woocommerce_order_status_cancelled(): : processSubscriptionCancellation(): payer_email= xxxxxx 2017-12-29 18:18:28:loadUserByEmail: email=xxxxxx 2017-12-29 18:18:28:DAP-WP-Livelinks.dap_woocommerce_order_status_cancelled(): : processSubscriptionCancellation(): load user: xxxxxx 2017-12-29 18:18:28:DAP-WP-Livelinks.dap_woocommerce_order_status_cancelled(): : processSubscriptionCancellation(): loadProductByName : Parenting for Excellence 2017-12-29 18:18:28:DAP-WP-Livelinks.dap_woocommerce_order_status_cancelled(): : processSubscriptionCancellation(): userId=523, productId=27 2017-12-29 18:18:28:DAP-WP-Livelinks.dap_woocommerce_order_status_cancelled(): : processSubscriptionCancellation(): NO ACTION TAKEN PER PRODUCT EXPIRATION SETTING 2017-12-29 18:18:28:dap-woocommerce.php: processWCOrderCancellation(): EXIT.. completed cancellation 2017-12-29 18:18:28:DAP-WP-LiveLinks.php:dap_woocommerce_order_status_cancelled(): EXIT
Thanks for the log.
It seems like the issue is coming from the DAP service which appears to be handling the transaction process between WooCommerce and PayPal.
I’m not familiar enough with it though… so would suggest reaching out to the authors. Or if you have some documentation about it, feel free to post a link so we can check it out.
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.
- The topic ‘WC Paypal Transaction Cancelled – Sending Payment Completed Notification’ is closed to new replies.