I am working with a new install of OpenCart 3.0.4.0, currently running under php 7.4 with plans to update to 8.1. I have installed and setup PayPal Checkout Integration V3.0.2 (which came with the 3.0.4.0 installation) in Sandbox mode . While I am able to pay using PayPal and PayPal-PayLater, neither option ever receives a callback to mark the order complete in the OpenCart Store. I also find no record of payments or attempted payments in the Sandbox. Is there a setting somewhere for that?
Last edited by jennarif on Sat Aug 31, 2024 2:31 am, edited 2 times in total.
Have you checked the information provided previously on the forum?
viewtopic.php?t=207014
viewtopic.php?t=171853
viewtopic.php?t=231125
viewtopic.php?t=221620
https://www.google.com/search?q=opencar ... t+callback
Please return with your solution, or with more information like what you have checked and your error logs.
viewtopic.php?t=207014
viewtopic.php?t=171853
viewtopic.php?t=231125
viewtopic.php?t=221620
https://www.google.com/search?q=opencar ... t+callback
Please return with your solution, or with more information like what you have checked and your error logs.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Check both your OpenCart and PHP error logs. Look in your raw access logs for /index.php?route=extension/payment/paypal/callback or /index.php?route=extension/payment/paypal/webhook to see if your server is receiving notification from PayPal.
You could also try the latest version of the extension.
You could also try the latest version of the extension.
I just completed updating the PayPal Checkout Integration to the latest version (3.1.6). Following this, I placed an order and paid via PayPal. There are no errors in either my PHP or OpenCart error logs. I see the following entries in my raw access logs:
[22/Aug/2024:20:52:06 +0000] "POST /store/index.php?route=extension/payment/paypal/createOrder HTTP/1.1" 200 59 "https://dev.site.com/store/index.php?ro ... t/checkout" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0"
[22/Aug/2024:20:52:32 +0000] "POST /store/index.php?route=extension/payment/paypal/approveOrder HTTP/1.1" 200 100 "https://dev.site.com/store/index.php?ro ... t/checkout" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0"
[22/Aug/2024:20:52:42 +0000] "GET /store/index.php?route=checkout/success HTTP/1.1" 200 6491 "https://dev.site.com/store/index.php?ro ... t/checkout" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0"
[22/Aug/2024:20:52:47 +0000] "POST /store/index.php?route=extension/payment/paypal&webhook_token=213658cd4a5ae6fc96282b3d7fb20c5d9900c305 HTTP/1.1" 200 - "-" "PayPal/AUHD-214.0-58610500"
The order still remains marked as pending in the store admin. Under Order History->PayPal Checkout Integration tab, I see this:

When I click on the link, the PayPal sandbox says "We are not able to find this transaction id. Can you please check and try again later."
[22/Aug/2024:20:52:06 +0000] "POST /store/index.php?route=extension/payment/paypal/createOrder HTTP/1.1" 200 59 "https://dev.site.com/store/index.php?ro ... t/checkout" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0"
[22/Aug/2024:20:52:32 +0000] "POST /store/index.php?route=extension/payment/paypal/approveOrder HTTP/1.1" 200 100 "https://dev.site.com/store/index.php?ro ... t/checkout" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0"
[22/Aug/2024:20:52:42 +0000] "GET /store/index.php?route=checkout/success HTTP/1.1" 200 6491 "https://dev.site.com/store/index.php?ro ... t/checkout" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0"
[22/Aug/2024:20:52:47 +0000] "POST /store/index.php?route=extension/payment/paypal&webhook_token=213658cd4a5ae6fc96282b3d7fb20c5d9900c305 HTTP/1.1" 200 - "-" "PayPal/AUHD-214.0-58610500"
The order still remains marked as pending in the store admin. Under Order History->PayPal Checkout Integration tab, I see this:

When I click on the link, the PayPal sandbox says "We are not able to find this transaction id. Can you please check and try again later."
Looks like you are getting the web hook. Switching on the debug mode in the extension and then looking in the "paypal.log" log file, may tell you what status PayPal is sending. Also check and reset the Order Statues in the extension and the Settlement Method you have set in the extension.
I did have PayPal debug turned on and meant to include that in my previous post. Sorry! Here is what is in the log file for that purchase:
2024-08-22 20:52:34 - PayPal debug (Capture Order): {"id":"69119363P5014351C","status":"COMPLETED","payment_source":{"paypal":{"email_address":"jtest07@mystore.com","account_id":"3HE8ZKVYEAYHC","account_status":"VERIFIED","name":{"given_name":"june","surname":"test"},"address":{"country_code":"US"}}},"purchase_units":[{"reference_id":"default","payments":{"captures":[{"id":"8K719192TF819273S","status":"PENDING","status_details":{"reason":"UNILATERAL"},"amount":{"currency_code":"USD","value":"65.00"},"final_capture":true,"seller_protection":{"status":"NOT_ELIGIBLE"},"invoice_id":"10643_20240822_205207","links":[{"href":"https:\/\/api.sandbox.paypal.com\/v2\/payments\/captures\/8K719192TF819273S","rel":"self","method":"GET"},{"href":"https:\/\/api.sandbox.paypal.com\/v2\/payments\/captures\/8K719192TF819273S\/refund","rel":"refund","method":"POST"},{"href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/69119363P5014351C","rel":"up","method":"GET"}],"create_time":"2024-08-22T20:52:33Z","update_time":"2024-08-22T20:52:33Z"}]}}],"payer":{"name":{"given_name":"june","surname":"test"},"email_address":"jtest07@mystore.com","payer_id":"3HE8ZKVYEAYHC","address":{"country_code":"US"}},"links":[{"href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/69119363P5014351C","rel":"self","method":"GET"}]}
2024-08-22 20:52:47 - PayPal debug (Webhook): {"id":"WH-5WT250213R5317233-0SC95996G2292462C","event_version":"1.0","create_time":"2024-08-22T20:52:38.177Z","resource_type":"capture","resource_version":"2.0","event_type":"PAYMENT.CAPTURE.PENDING","summary":"Payment pending for $ 65.0 USD","resource":{"amount":{"value":"65.00","currency_code":"USD"},"seller_protection":{"status":"NOT_ELIGIBLE"},"supplementary_data":{"related_ids":{"order_id":"69119363P5014351C"}},"update_time":"2024-08-22T20:52:33Z","create_time":"2024-08-22T20:52:33Z","final_capture":true,"invoice_id":"10643_20240822_205207","links":[{"method":"GET","rel":"self","href":"https:\/\/api.sandbox.paypal.com\/v2\/payments\/captures\/8K719192TF819273S"},{"method":"POST","rel":"refund","href":"https:\/\/api.sandbox.paypal.com\/v2\/payments\/captures\/8K719192TF819273S\/refund"},{"method":"GET","rel":"up","href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/69119363P5014351C"}],"id":"8K719192TF819273S","status_details":{"reason":"UNILATERAL"},"status":"PENDING"},"links":[{"href":"https:\/\/api.sandbox.paypal.com\/v1\/notifications\/webhooks-events\/WH-5WT250213R5317233-0SC95996G2292462C","rel":"self","method":"GET"},{"href":"https:\/\/api.sandbox.paypal.com\/v1\/notifications\/webhooks-events\/WH-5WT250213R5317233-0SC95996G2292462C\/resend","rel":"resend","method":"POST"}]}
And here are my settings:
GENERAL

ORDER STATUSES

Should the settlement method in the General Settings be set to Authorization instead?
2024-08-22 20:52:34 - PayPal debug (Capture Order): {"id":"69119363P5014351C","status":"COMPLETED","payment_source":{"paypal":{"email_address":"jtest07@mystore.com","account_id":"3HE8ZKVYEAYHC","account_status":"VERIFIED","name":{"given_name":"june","surname":"test"},"address":{"country_code":"US"}}},"purchase_units":[{"reference_id":"default","payments":{"captures":[{"id":"8K719192TF819273S","status":"PENDING","status_details":{"reason":"UNILATERAL"},"amount":{"currency_code":"USD","value":"65.00"},"final_capture":true,"seller_protection":{"status":"NOT_ELIGIBLE"},"invoice_id":"10643_20240822_205207","links":[{"href":"https:\/\/api.sandbox.paypal.com\/v2\/payments\/captures\/8K719192TF819273S","rel":"self","method":"GET"},{"href":"https:\/\/api.sandbox.paypal.com\/v2\/payments\/captures\/8K719192TF819273S\/refund","rel":"refund","method":"POST"},{"href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/69119363P5014351C","rel":"up","method":"GET"}],"create_time":"2024-08-22T20:52:33Z","update_time":"2024-08-22T20:52:33Z"}]}}],"payer":{"name":{"given_name":"june","surname":"test"},"email_address":"jtest07@mystore.com","payer_id":"3HE8ZKVYEAYHC","address":{"country_code":"US"}},"links":[{"href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/69119363P5014351C","rel":"self","method":"GET"}]}
2024-08-22 20:52:47 - PayPal debug (Webhook): {"id":"WH-5WT250213R5317233-0SC95996G2292462C","event_version":"1.0","create_time":"2024-08-22T20:52:38.177Z","resource_type":"capture","resource_version":"2.0","event_type":"PAYMENT.CAPTURE.PENDING","summary":"Payment pending for $ 65.0 USD","resource":{"amount":{"value":"65.00","currency_code":"USD"},"seller_protection":{"status":"NOT_ELIGIBLE"},"supplementary_data":{"related_ids":{"order_id":"69119363P5014351C"}},"update_time":"2024-08-22T20:52:33Z","create_time":"2024-08-22T20:52:33Z","final_capture":true,"invoice_id":"10643_20240822_205207","links":[{"method":"GET","rel":"self","href":"https:\/\/api.sandbox.paypal.com\/v2\/payments\/captures\/8K719192TF819273S"},{"method":"POST","rel":"refund","href":"https:\/\/api.sandbox.paypal.com\/v2\/payments\/captures\/8K719192TF819273S\/refund"},{"method":"GET","rel":"up","href":"https:\/\/api.sandbox.paypal.com\/v2\/checkout\/orders\/69119363P5014351C"}],"id":"8K719192TF819273S","status_details":{"reason":"UNILATERAL"},"status":"PENDING"},"links":[{"href":"https:\/\/api.sandbox.paypal.com\/v1\/notifications\/webhooks-events\/WH-5WT250213R5317233-0SC95996G2292462C","rel":"self","method":"GET"},{"href":"https:\/\/api.sandbox.paypal.com\/v1\/notifications\/webhooks-events\/WH-5WT250213R5317233-0SC95996G2292462C\/resend","rel":"resend","method":"POST"}]}
And here are my settings:
GENERAL

ORDER STATUSES

Should the settlement method in the General Settings be set to Authorization instead?
Sale should work. Looks like the webhook is working. From you log the webhook is returning "event_type":"PAYMENT.CAPTURE.PENDING" this is why the status for your order is set to pending. Could be something wrong with you PayPal Sandbox account not completing payments.
OK... I finally got it working. The issue was pretty simple actually. In setting up the connection in my store admin, I selected 'sandbox' in the drop-down and then signed into PayPal with our company account. I didn't realize I had to connect to our developer account. (I'm used to working with Stripe which doesn't require separate accounts.) So - I used a developer business account to connect and now it all works as it should. Thanks for helping!
Glad to hear you got it to work now. Could you please add '[SOLVED]' to the beginning of this original form thread title? Thanks.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Who is online
Users browsing this forum: No registered users and 8 guests