Reputation: 1553
I have a business paypal account approved and I want to integrate paypal direct payment PRO into my website. I found lots of paypal APIs and of course APIs are documented , but not realy. I cannot realy understand exactly each API purpose. I can understand only what it says in general few words in documentation, but still I have to guess and I'm not sure, so please help me to clarify next procedures:
please help me to understand what APIs and how I need to use them.
I guess, I tried:
for 1: API: DoDirectPayment , with parameter: Authorization however I did entered a wrong card holder name, and true other details like credit card number, and paypal returnetd ACK successful. so it is not realy make sense .. for 2: API: DoCapture . I'm not sure . I guess I need to save transaction id into my database and use it later with DoCapture each time i need to take instant payment. for 3: API: CreateRecurringPaymentsProfile I'm not sure. from where should I read and fill payment details, from my database or i need to request user details again... for 4: API: DoDirectPayment , with parameter: Sale hoever, I'm not sure how to do that.
Please, do not pay to much attention to the things which I'm guessing, and please if you know tell me the right ways to process those 4 stepss listed above, which APIs I need to use, and if possible a short example.
UPDATE:
also what happens if I will call CreateRecurringPaymentsProfile with :
'PROFILESTARTDATE' => date('Y-m-d\TH:i:s\Z',strtotime("+30 days"))
'TRIALBILLINGPERIOD' => 'Month'
Upvotes: 0
Views: 302
Reputation: 7329
You can use the DoDirectPayment API to process a credit card payment directly on your site. This will be the API that actually charges the buyer. This API is not going to verify the name on the card, there are no checks for this. You would only be able to verify that the card is valid and able to be charged, along with the card security code, and the bililng address associated with the card.
If you are wanting to charge the buyer agian later down the road, without the buyer having to enter their details again you can use the DoReferenceTransaction API call. All you need to do is pass over the transaction of the last previuosly succesful transaction id. So you will need to store these transaction id's in your system so that you can reference them later as part of the reference transaction API call. Reference Transactions is a feature that is not enabled on accounts by default, you will need to contact PayPal and have this enabled on your live account. If you are needing this enabled on your test account, if you can provide the email address for your test sandbox seller account I can enable this for you.
If you are wanting to create a monthly recurring payment profile, you can do 1 of 2 things. You can contact PayPal and sign up for Recurring Payments on your account. There is a monthly charge for this service. Then you would use the CreateRecurringPaymentsProfile API call to create the profile and set the buyer up on a monthly billing profile. Another option, would be to use the reference transactions API and have your system process the recurring charges. You could set up a cron job or etc to run every month and charge your buyers.
Hope this helps.
Upvotes: 1