Solved

Very Simple PayPal Question

Posted on 2016-09-07
3
76 Views
Last Modified: 2016-09-07
When you are using a simple "Buy Now" Paypal button & you specify a "return" page, how can you tell the result of the transaction? (Good or Bad).

As best I can tell, from testing, there is no "bad" because PayPal will NEVER let you finish unless you put in valid info. You are stuck until you x out that page. Seems VERY unprofessional.

Is there a parameter (hidden form field) that let's you allow Cancel? So the customer is not left in limbo?

Thanks
0
Comment
Question by:Richard Korts
3 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 41788903
according to PayPal developer documentation:

The state of the payment, authorization, or order transaction. The value is:

    created. The transaction was successfully created.
    approved. The buyer approved the transaction.
    failed. The transaction request failed.
https://developer.paypal.com/docs/api/payments/
look for the Response section.
0
 

Author Comment

by:Richard Korts
ID: 41789002
Ryan Chong

How is that passed back to the web site?
0
 
LVL 11

Accepted Solution

by:
Andrew Angell earned 500 total points
ID: 41789006
The info Ryan Chong provided is related to the REST API which is not going to be the same as what you're doing with Payments Standard.

If the user decides to "x out" that would be equivalent to canceling.  There is also a link to "Cancel and return to merchant site" on the login screen.  Either way, they would be sent back to your cancel URL.

If they complete the transaction they'll be sent to your return URL.  As I mentioned in your other question, you can use PDT (Payment Data Transfer) to return transaction details back to this URL so that you can build logic to display what you want.

PDT is very similar to IPN except that PDT sends data back to your return URL and IPN takes place in a separate listener URL that is not part of your checkout at all.

PayPal provides an IPN and PDT variables documentation that outlines all the data you could potentially get back.

Included in that you'll find the following parameters which are typically used to build your return URL however you need to.

- payment_status
- auth_status
- payer_status
- address_status
- profile_status
- initial_payment_status

Not every parameter will come back in every transaction.  It depends on the transaction type.  All of that is covered in the doc I linked to.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to reset your Windows 10 password when you've forgotten it.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question