Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › Display PayPal result code on “error” redirect page?
Tagged: PayPal
- This topic has 8 replies, 3 voices, and was last updated 2 weeks, 1 day ago by
admin.
-
AuthorPosts
-
April 15, 2025 at 6:05 am #85146
safigan
ParticipantHello, we use PayPal through the eStore for our payment processing. Occasionally a customer will *incorrectly* get redirected to the “error” URL rather than the “success” URL after they make a successful payment. This causes them to try again, and the second time they get redirected to the “success” URL, but it results in a double payment. Because we don’t know what they’re doing to cause this, we can’t repeat it ourselves.
What we’d like to do is to display the PayPal result code (see https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/result_values_for_transaction_declines_or_errors.htm) so the customer could read it off the screen to us. Hopefully knowing the specific decline reason will allow us to properly troubleshoot this issue. Is there a way we could display this result code on the “error” page? Thank you.
April 15, 2025 at 2:55 pm #85147wzp
ModeratorDo you have the eStore debug logs turned on? The process flows and any errors should be recorded in the debug longs.
April 15, 2025 at 3:08 pm #85148safigan
ParticipantI don’t have the debug logs turned on. Would the debug logs record the PayPal result code? If not, then the debug logs wouldn’t help me.
Assuming PayPal is returning a non-zero result code, eStore is handling the result properly. But without knowing the PayPal result code, I have little hope of narrowing down what could be happening.
April 16, 2025 at 4:18 pm #85149wzp
ModeratorPlease TURN ON the debug logs. Without the debug logs, it is extremely hard to assist you.
April 17, 2025 at 11:34 am #85150safigan
ParticipantWhen I went to turn on debug logs, they were already on. Here’s the debug entries for a transaction that was redirected to the “transaction error” URL. (I altered the email address slightly in the log entries below to maintain the customer’s confidentiality.) The post-payment emails got sent out properly, it’s just that the customer was sent to the “error” URL instead of the “success” URL which confuses our customers into trying the payment again.
What’s next?
Entries from ipn_handle_debug.log
[02/27/2025 9:55 PM] – SUCCESS :Paypal Class Initiated by 173.0.81.65 eStore Version: 8.5.7
[02/27/2025 9:55 PM] – SUCCESS :Post string : mc_gross=100.00&protection_eligibility=Eligible&payer_id=5E2LL6JUWQMTW&payment_date=13%3A55%3A40+Feb+27%2C+2025+PST&payment_status=Completed&charset=windows-1252&first_name=Rene&mc_fee=2.48¬ify_version=3.9&custom=ip%3D75.141.209.119&payer_status=unverified&business=payment%40foundations1.com&quantity=1&verify_sign=AYWfifNEOZyVdiO6MGZYKsGZOlaNAH.SdFdbBQ-lB-VYcjDEwH8e3Hmr&payer_email=rene.albert6x%40gmail.com&txn_id=43303396F9998722V&payment_type=instant&last_name=Albert&receiver_email=office%40foundations1.com&payment_fee=2.48&shipping_discount=0.00&receiver_id=ZZUGC77W6QVK4&insurance_amount=0.00&txn_type=web_accept&item_name=Workshop+payment+for+Bill+Roberts+Friend&discount=0.00&mc_currency=USD&item_number=1&residence_country=US&receipt_id=3768-2717-1384-4812&shipping_method=Default&transaction_subject=&payment_gross=100.00&ipn_track_id=f212501d988d0&
[02/27/2025 9:55 PM] – SUCCESS :Checking if PayPal IPN response is valid
[02/27/2025 9:55 PM] – SUCCESS :Connecting to: https://www.paypal.com/cgi-bin/webscr
[02/27/2025 9:55 PM] – SUCCESS :IPN successfully verified.
[02/27/2025 9:55 PM] – SUCCESS :Creating product Information to send.
[02/27/2025 9:55 PM] – SUCCESS :Transaction Type (Buy Now/Subscribe): web_accept
[02/27/2025 9:55 PM] – SUCCESS :Item Number: 1
[02/27/2025 9:55 PM] – SUCCESS :Item Name: Workshop payment for Bill Roberts Friend
[02/27/2025 9:55 PM] – SUCCESS :Item Quantity: 1
[02/27/2025 9:55 PM] – SUCCESS :Item Price: 100
[02/27/2025 9:55 PM] – SUCCESS :Item Shipping: 0
[02/27/2025 9:55 PM] – SUCCESS :Item Currency: USD
[02/27/2025 9:55 PM] – SUCCESS :Price paid: 100, True price: 0
[02/27/2025 9:55 PM] – SUCCESS :Value of the reference text field for this product:
[02/27/2025 9:55 PM] – SUCCESS :Generating encrypted download link for this product.
[02/27/2025 9:55 PM] – SUCCESS :Download Link: [hidden]
[02/27/2025 9:55 PM] – SUCCESS :Incremental counter value for PayPal checkout: 620
[02/27/2025 9:55 PM] – SUCCESS :Applying filter – eStore_notification_email_body_filter
[02/27/2025 9:55 PM] – SUCCESS :About to send buyer notification email. From Email Address Value: Foundations <steve@foundations1.com>
[02/27/2025 9:55 PM] – SUCCESS :Product Email successfully sent to [XX]
[02/27/2025 9:55 PM] – SUCCESS :Applying filter – eStore_seller_notification_email_body_filter
[02/27/2025 9:55 PM] – SUCCESS :Notify Email successfully sent to [YY]
[02/27/2025 9:55 PM] – SUCCESS :Updating Products, Customers, Coupons, Sales Database Tables with Sales Data.
[02/27/2025 9:55 PM] – SUCCESS :Product ID: 1. Current available copies value: Sales count value: 544
[02/27/2025 9:55 PM] – SUCCESS :New available copies value: New sales count value: 545
[02/27/2025 9:55 PM] – SUCCESS :Products, Customers, Coupons, Sales Database Tables Updated.
[02/27/2025 9:55 PM] – SUCCESS :Updating Affiliate Database Table with Sales Data if Using the WP Affiliate Platform Plugin.
[02/27/2025 9:55 PM] – SUCCESS :Not using the WP Affiliate Platform plugin.
[02/27/2025 9:55 PM] – SUCCESS :Paypal class finished.April 17, 2025 at 9:21 pm #85151admin
KeymasterThe log data you shared looks good—there was no issue with that transaction. The PayPal Standard checkout you’re using doesn’t redirect to any error URL by default.
Could you please share a screenshot of the error URL you’re referring to? That would help me understand the issue better with a visual reference.
This is most likely a site-specific issue related to your server environment or a potential conflict.
The first thing to check is whether you have any caching enabled on your site. If caching is active, it’s possible that users are being shown a cached page containing an error message from a previous failed transaction.
The e-commerce functionality needs a dynamic page being shown to the visitors (so they are seeing the latest values/data of a product). A cached page simply shows a static cached page (our plugin doesn’t get a chance to apply the latest calculation and price to that page). When a cached page is being shown, the user is not actually being shown the updated price values of a product. That’s what causes the issue with e-commerce type setup because an e-commerce type site is not the same as a blog type site. Caching is normally fine with a Blog type site where there is no need to show updated content.
If your caching solution has an option to disable caching when a cookie is present, then I can tell you which cookie to set in the configuration of your caching solution or plugin. Otherwise, you can ask them if you can exclude the page containing the products to be excluded from caching.
Exclude the pages (containing the payment buttons and the thank you page) from caching.
April 20, 2025 at 1:23 pm #85158safigan
ParticipantI can’t seem to get my most recent reply to this thread to post. Even though I don’t see it above, I get the error message, “Duplicate reply detected; it looks as though you’ve already said that.”
Then I tried posting a short unrelated message. It posted fine. So I tried to edit that same message, appending the reply I want to post onto the end of it. The edited post then disappeared!
Is there a way I can get my reply to post, or is there an alternate way to get my reply to you?
April 20, 2025 at 8:30 pm #85160admin
KeymasterHi, Use the support contact form on our site to get in touch.
-
AuthorPosts
- You must be logged in to reply to this topic.