Paypal API

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
asaklex
Forum Newbie
Posts: 1
Joined: Thu Mar 31, 2011 7:53 pm

Paypal API

Post by asaklex »

Hi, everybody
I'm building a website for sale.I'm realy new in codes.
I'm using paypal API for checkout. In my PHP scripts,i used curl() function in order to manage the transaction with paypal.
My problem is that when i get the details of payment from paypal, i don't how to identify the customer which is online in order
to continue my script. Actually i build an array to get paypal's data. THe problem is on my side, how to retrieve the customer id
who logged on my website(that id is saved in my data base), before he is redirected to paypal.

Please help

Thank you
klandaika
Forum Newbie
Posts: 19
Joined: Wed Mar 30, 2011 3:25 pm
Location: New York

Re: Paypal API

Post by klandaika »

Where is your API script running? Doesn't the customer press a button pay now, which makes the payment script to run. In which case the customer is probably logged in to your website. Which leads to the question how are you keeping track of the logged in customer?

Paypal provides custom fields in most of their APIs (i.e. when using DoDIrectPayment there is a field name CUSTOM which you can set to any value and it gets returned to you when payment goes through).
Which API call are you using exactly?
Post Reply