I am using PayPal Payflow SDK for Java v4.40
My business requirements don't allow me to store any credit card info (last 4 digits, expiry date, etc) in my app. But my app might need to access them occasionally.
Is there a way to query for the original credit card info (last 4 digits, expiry date, etc.) given a PayPal PNREF that was obtained from a previous sale transaction?
paypal.payflow.TransactionResponse class has a getAcct() method, but I was not able to figure out how to get payflow to include account info in a TransactionResponse.
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.
I want to use PayPal Payment Advanced API to store the customer's credit card info on the PayPal's website the first time the customer enters the credit card info. For subsequent customer visits, i want to retrieve the Credit Card info from the PayPal's server. Is this possible? What does the PayPal server return me ( like a transaction id )that I can store in my database for that customer and then use it for subsequent requests.
Thanks
There is no API for Paypal payments advanced. From their tutorials:
PayPal Payments Advanced requires use of PayPal's hosted checkout template...
This means that you have to use their hosted pages (you can probably do so using an iframe if you want). The reason for that is that in order to collect credit-card details you have to be PCI compliant, meaning, you have to pass a series of security checks/tests. This process took my company almost two years and major development (and other) resources, so you probably don't want to go down that path.
Is there a way to integrate /vault/credit-card call with PayPal payment buttons? I do not want to work with client credit card information but i can't find a way to redirect the client to paypal only to store his credit card information and for me to get his id on paypal to charge him than needed
You could use the PayPal/Payflow hosted checkout pages and process a 1.00 authorization. Then store the transaction id on your system. Then when you want to charge the buyer, you would just use the reference transaction API call to charge them. You only need to pass over the amount you want to charge along with the previous successful transaction id, and PayPal will use the same credit card information that was used in the last transaction.
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/
Lets say customers have signed up for a free trial and should be charged only at the end of their trial period if they want to continue their service. I'm looking to do the following via PayPal's APIs:
Before storing their CC data, check to see if the card is valid
Create, Update, Delete, and Get credit card information on PayPal
Also link a user's CC data to their username or ID on my system
Store CC data but bill the customers later (needed for a trial application)
Are these doable on PayPal?
You cannot do some of the above features in PayPal.
Here is what you can do in PayPal.
First option - DoReferenceTransactionReq (charge time and amount can be vary)
1) Charge customer's credit card first (let say $5)
2) Save that transaction id
3) Reference that transaction id for next billing (do not need credti card again)
Second option - CreateRecurringPaymentsProfileReq (Recurrening time and amount are fixed)
1) Create recurrent profile based on time (Eg. day, week, year)
2) PayPal will bill customer's account automatically
Authorize.Net also has same feature called CIM (Customer Information Manager). It is more easier to store/access user profiles and payment profiles. Besides, you do not need to charge customer's credit card first.