close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Trying to safely capture error message response from PayPal

Thread began 5/11/2020 12:56 pm by TroyD | Last modified 5/12/2020 2:05 pm by Ray Borduin | 15 views | 3 replies |

TroyD

Trying to safely capture error message response from PayPal

Ray,

On rare occasions, customers will say they get an error but we don’t know what that error is. My guess is it’s a declined card or incorrect city or state combination since dozens of orders go through successfully then one will fail.

When debugging a failed checkout, I use the code below. I think I got this from one of your posts a while back.

@session_start();
echo "<p>Direct Pay: <br>";
echo "Full Request: ".(isset($_SESSION["PP_DirectPayment_postedValues"])?htmlentities($_SESSION["PP_DirectPayment_postedValues"]):"n/a")."<br>";
echo "Full Response: ".(isset($_SESSION["PP_DirectPayment"])?htmlentities($_SESSION["PP_DirectPayment"]):"n/a")."<br></p>";
echo "<p>Express Authorize <br>";
echo "Full Request: ".(isset($_SESSION["ECO_Auth_Request"])?htmlentities($_SESSION["ECO_Auth_Request"]):"n/a")."<br>";
echo "Full Response: ".(isset($_SESSION["ECO_Auth_Result"])?htmlentities($_SESSION["ECO_Auth_Result"]):"n/a")."<br>";
echo "<p>Express Process: <br>";
echo "Full Request: ".(isset($_SESSION["ECO_Process_Request"])?htmlentities($_SESSION["ECO_Process_Request"]):"n/a")."<br>";
echo "Full Response: ".(isset($_SESSION["ECO_Process_Result"])?htmlentities($_SESSION["ECO_Process_Result"]):"n/a")."<br></p>";



Since I can’t leave that code exposed all of the time, I was wondering if I can simply add it to an email behavior that is triggered on the checkout_failure page so that it is safely emailed to me in the event that someone has an issue. You mentioned this briefly here, http://www.webassist.com/forums/post/195860/ but I am not sure how to do this.

Would it be as simple as adding to the email template? Do I need to include any other files to the failure page or email template since the above code already works on the failure page?

Thanks,
TroyD

Sign in to reply to this post

Ray BorduinWebAssist

Yes... You can just add a send email on the failure page and copy and paste this code into the email body template to be included.

Sign in to reply to this post
Did this help? Tips are appreciated...

TroyD

Thanks Ray,

Right away I started getting errors emailed to me. 2 of them included Data type '' mismatch in element 'CreditCardType' for the faultstring. Both were using an American Express credit card. I found here http://www.webassist.com/forums/posts.php?id=37407 where you suggested to change the dropdown value for the American Express to "Amex". Is that still the correct solution?

Thanks
TroyD

Sign in to reply to this post

Ray BorduinWebAssist

Yes. That should fix it.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...