James Nine
James Nine

Reputation: 2618

PayPal Payments Advanced: what is the return data for Direct Payment

I have PayPal Payments Advanced setup, and am using their hosted checkout pages. The very first, initial page gives the user two options (on the paylinkpro.paypal.com page):

paylinkpro screenshot

So I have everything working fine when the user clicks on "Checkout w/ PayPal". The issue I'm running into is when a user decides to enter in their credit card information on the 2nd box below (Pay with credit or debit card). I'm trying to figure out what exactly happens when the user (after they enter in all their card info) clicks on the "Pay Now" button at the bottom? I'm assuming they will be redirected to an endpoint that I've specified (in manager.paypal.com, just like the endpoint specified by the "Checkout w/ PayPal" button), but I'm not sure what the data sent back to my server looks like?

Does anyone have an example of the output by any chance? And how does it differ from the other response sent when a user decides to pay via PayPal instead? I need to know the difference so I can know how to handle each response differently, because it seems the "Pay Now" button gives a completely different response, resulting in an error on my end (I get a 5XX server error).

FYI, I'm using PHP on the server side.

Upvotes: 0

Views: 335

Answers (1)

Eshan
Eshan

Reputation: 3677

You should run a test at your end to get the better understanding of what variables are passed in both cases .Actually the parameters remain same in both the cases except some. I have posted the variables from my test for type of payment methods that I receive at my return url :

For credit card payments :

AVSZIP=Y
TYPE=S
STATE=VA
ZIPTOSHIP=23455
ACCT=9988
PROCCVV2=M
PPREF=9K626765P4119092S
EMAIL=tsoasasa4%40gmail.com
ADDRESSTOSHIP=2323+Richardson+Rd
METHOD=CC
SHIPTOCOUNTRY=US
TRANSTIME=2014-10-08%2017:05:54
INVOICE=rdassC-sAADS-q3aa98sa6a
IAVS=N
STATETOSHIP=VA
BILLTOZIP=23455
SHIPTOSTATE=VA
BILLTOCITY=Virginia+Beach
TAX=0.72
CARDTYPE=0
AVSDATA=YYY
CITYTOSHIP=Virginia+Beach
PROCAVS=X
SECURETOKEN=9nFUJSuaWQk2bwnWhl1iYvQM2
INVNUM=rdassC-sAADS-q3aa98sa6a
CITY=Virginia+Beach
BILLTOSTREET=3947+Richardson+Rd
RESULT=0
TRXTYPE=S
[email protected]
BILLTOLASTNAME=Tsosie
BILLTONAME=Rolaasand%20Tsosie
SHIPTOCITY=Virginia+Beach
CVV2MATCH=Y
LASTNAME=Tssaosie
PNREF=B70P6F3BC67D
TENDER=CC
PHONE=757-262-8051
SHIPTOZIP=23455
BILLTOFIRSTNAME=Roland
AMT=12.72
CORRELATIONID=89e0742fc9da4
NAMETOSHIP=Roland+Tsosie
ZIP=23455
BILLTOCOUNTRY=US
AUTHCODE=111111
EXPDATE=0119
RESPMSG=Approved
COUNTRY=US
SHIPTOSTREET=3947+Richardson+Rd
BILLTOSTATE=VA
FIRSTNAME=Roland
SECURETOKENID=wswqasxxg7azasajsa98988la531f4x31ec3
AVSADDR=Y
BILLTOPHONE=757-262-8051
NAME=Roland+Tsosie
COUNTRYTOSHIP=US
ADDRESS=3947+Richardson+Rd

For PayPal Payments :

AVSZIP=Y
STATE=VA
TYPE=S
ZIPTOSHIP=23455
PPREF=0F868584E70198612
PAYERID=4E3LKXST3TKCY
EMAIL=Eshan%40personal.com
ADDRESSTOSHIP=2131+Richardson+Rd
METHOD=P
SHIPTOCOUNTRY=US
TRANSTIME=2014-10-08%2017:09:25
INVOICE=rdassC-sAADS-q3aa98sa6asaa
STATETOSHIP=VA
TOKEN=EC-5C851027CE4200400
BILLTOZIP=23455
SHIPTOSTATE=VA
BILLTOCITY=Virginia+Beach
TAX=0.72
PAYMENTTYPE=instant
AVSDATA=YYY
CITYTOSHIP=Virginia+Beach
SECURETOKEN=8vhYqum1qRkOHaJmZ8TGU5wgw
INVNUM=rdassC-sAADS-q3aa98sa6asaa
CITY=Virginia+Beach
BILLTOSTREET=3947+Richardson+Rd
RESULT=0
TRXTYPE=S
[email protected]
BILLTOLASTNAME=Account
BILLTONAME=Roland%20Tsosie
SHIPTOCITY=Virginia+Beach
LASTNAME=Tsosie
TENDER=P
PNREF=B1PP7AF2E280
PHONE=757-262-8051
SHIPTOZIP=23455
BILLTOFIRSTNAME=Eshan%20Personal%20Test
AMT=12.72
CORRELATIONID=95a351e2471dd
PENDINGREASON=completed
NAMETOSHIP=Eshan+Personal+Test+Account
FEEAMT=0.67
ZIP=23455
BILLTOCOUNTRY=US
TAXAMT=0.72
RESPMSG=Approved
COUNTRY=US
SHIPTOSTREET=3947+Richardson+Rd
BILLTOSTATE=VA
FIRSTNAME=Roland
SECURETOKENID=wswqasxxg7azasajasasa98988la531f4x31
AVSADDR=Y
BILLTOPHONE=757-262-8051
NAME=Roland+Tsosie
COUNTRYTOSHIP=US
ADDRESS=2121+Richardson+Rd

And yes you will be redirected to the return url mentioned in manager account . However if you pass the return url from the code it will override it.

Upvotes: 1

Related Questions