Tono Nam
Tono Nam

Reputation: 36048

Charge customer again given transaction id

I have a paypal pro account and I am able to charge a customer's credit card thanks to this example (https://developer.paypal.com/docs/classic/payflow/gs_payflow/) Scroll to:

enter image description here

When I send that post request to pilot-payflowpro.paypal.com it returns me:

RESULT=0&PNREF=B10P9B85A1E1&RESPMSG=Approved&AUTHCODE=111111&PPREF=AB0QI2R07HHG1S9MB&CORRELATIONID=2c9706997458s

Anyways because I do not want to store that user's credit card information is there a way I can charge the same credit card a different amount again given the AUTHCODE or PNREF for example? I will like to give the user the option to save his credit card in our website so that he does not has to enter it again. If he chooses to save his credit card I will only be saving the authorization, PNREF etc. Hopefully with that I am able to process another payment through paypal.

Upvotes: 0

Views: 113

Answers (1)

Drew Angell
Drew Angell

Reputation: 26036

Yes, what you're looking for is called a Reference Transaction.

Open up the PayFlow Developer Guide, do a find on the page for "reference transaction" and read through the different things you find.

It's almost exactly the same as processing the original payment except that it's short and sweet with just the original transaction ID and the new amount to charge.

Here's a sample reference transaction request pulled from the doc linked above:

TRXTYPE=S&TENDER=C&PWD=x1y2z3&PARTNER=PayPal&VENDOR=SuperMerchant
&USER=SuperMerchant&ORIGID=VXYZ01234567&AMT=34.00

Upvotes: 1

Related Questions