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:
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.
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
Related
I am trying to save credit card info so I can allow my users to recharge saved cards for subsequent purchases via the PayPal Payflow Pro API.
There seems to be a stored credential transactions feature with examples of how to indicate a CARDONFILE transaction, but I don't see anything about how to then recharge that card later without having the card number.
Here is an example of the a Card on File request and response...
TRXTYPE=S&TENDER=C&AMT=9.95&ACCT=4012000033330026&EXPDATE=0125&VERBOSITY=HIGH&STREET=100 SOUTH NORTH DR&CITY=NORTHWOOD&STATE=NH&ZIP=03275&CVV2=987&CARDONFILE=CITR
RESULT=0&PNREF=AS0O0D64E7C2&RESPMSG=Approved&AUTHCODE=010203&AVSADDR=Y&AVSZIP=Y&CVV2MATCH=X&TXID=X1Y2Z3100026810&HOSTCODE=00&RESPTEXT=APPROVAL&PROCAVS=Y&PROCCVV2=X&VISACARDLEVEL=A&IAVS=N
Notice on the end there is &CARDONFILE=CITR, this seems to indicate for PayPal that this is to be a card on file.
But then how would I recharge this card for a later purchase?
Thanks in advance for any help
You are describing reference transactions, so according to the Payflow documentation there is no need to specify CARDONFILE. It is handled for you.
To use reference transactions, save the PNREF of an initial sale transaction, delayed capture, or zero dollar authorization -- and reference it in the future for a new sale (TRXTYPE=S) with ORIGID instead of ACCT
Note that to use reference transactions they must be enabled in the settings of your Payflow Manager, and you must wait up to 1 hour after making changes to those settings.
We are Making a App in which We Take Payments from Customers and Give Them Points
same like Customer can give Points to Us and Take Payment . This is a Game
is there any payment Gate Way That Directly Paid Customer in his/her Credit Card
we want Payments Direct Credit Cards To Credit Cards
we will take customer credit cards when he will signup or later when he will give us points for Payment
Any Suggestion will be Appreciated
For PayPal, look at the following.
DoReferenceTransaction - This will allow you to hit somebody's credit card to process an amount without authentication so long as you've done a prior Authorization or Sale using the same credit card. So you could have people run an Authorization on their card just to ensure it's good and get a transaction ID that you can use in future DRT requests.
DoNonReferencedCredit - This will allow you to load funds onto a credit card without referencing any previous transaction (so it's different than a refund.) Keep in mind that when you send somebody money this way you won't get refunded fees like you would if you used the actual RefundTransaction API, so you may want to consider that.
You'll want to go through the detailed documentation for Reference Transactions, of course, to get a good understanding of it.
You'll also need a Payments Pro account to be able to process credit cards directly and utilize these features.
If you happen to be working with PHP I'd recommend using my class library for PayPal. It'll make the API calls very simple for you.
I want to use reference transactions and give the option to users to change their credit card. It looks like there are required fields like amount that don't apply and can't be zero.
Hopefully I can set it up so:
-User enters credit card info
-I can charge that card different amounts at different intervals
-Invisible PayPal (no express checkout or PayPal billing agreement
-User can change credit cards on my site.
Any ideas, or links to some documentation that can help?
If you want them to be able to update their card details then you'll need to run an Authorization against their new card and store the transaction ID you get back from that as the new ID to use within reference transaction requests.
You could just authorize $1.00 and then immediately void it, for example, to update your system with their new card.
stripe.js allows to associate a customer id with credit card. So, I don't need to store credit card and can still make payments multiple time for the same customer without asking for credit card details again.
Is there a similar flow for Paypal?
PayPals new REST API allows you to store a credit card in the vault, which will assign an id/token to it. You can then use that credit card token in future payments.
Following on from Finn's answer:
The advantage of Stripe.js is that there's no need for you to ever handle the customer's Credit Card info - it gets sent straight to Stripe's servers and never touches yours.
From the link he provided, it looks like you first have to process the credit card info on your severs, then send it to PayPal - although I suppose you could use Javascript to get the credit card info out of a form, create a POST request using jQuery (or similar) then retrieve the credit card info from the response and put that in the form - much like you have to do with Stripe.js
I’m building a site to be based in Australia and I have been researching into saving credit card numbers. Currently I have not had much luck with my questions. Paypal was of little help.
The site will run on many small transactions. I plan on using the paypal gateway to handle payment both via credit card and paypal accounts.
What I would like to do is retrieve user’s credit card details so they do not need to input them each time.
How I imagine this to work is that the first time a customer will input their credit card details to make the purchase. Once this purchase has been completed the site will receive a transaction ID from paypal. I then save this ID for future reference mapped to the users ID or email address.
So the next time the user wishes to make a purchase via their credit card I can forward this transaction ID to paypal and it can already have all the fields populated with their card details. Or display a screen with the last 4 digits or similar and ask the user if they wish to use this card again.
This is all assuming that the user does not have a paypal account.
Is this possible? Is there a better/more cost effective solution than this?
Your understanding isn't too far off. When you submit card details to PayPal (or any payment gateway) you should get back a token id. You would store that token id instead of the card details, then at any future point you wish to take payment you submit the token id (along with payment value etc)
By only storing the token value (and not the card details) you free yourself of most of the hassle with PCI compliance. PCI does allow you to store part of the card details in plain text (at most the first six and last four digits), so you could safely store these along with your token id. That would allow you to display these details and ask 'use this card again'
An example of this is documented at PayPal's site here:
https://developer.paypal.com/webapps/developer/docs/integration/direct/store-a-credit-card/