close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Trying to safely capture error message response from PayPal

Thread began 5/11/2020 9:56 am by TroyD | Last modified 5/12/2020 11:05 am by TroyD | 403 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

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...