codeigniter paypal url
I have downloaded the codeigniter paypal lib. I have few questions regarding this library.
My paypal url is set to this, $this->paypal_url = 'https://www.paypal.com/cgi-bin/webscr', Is it for testing!? How can I change it for actual transactions?!
My return url is set to a success co开发者_运维百科ntroller, but I am not able to view the post information returned by paypal. Could anyone tell, what exactly is the problem?!
I want to store the transaction details (Amount paid,paid by whom, on what date and for which product), How exactly I can achieve this?
thanks
A lot of my answers relate to the Adaptive Payments API, so apologies if it doesn't correspond 1:1 but hopefully it will point you in the right direction.
The URL you're pointing to is the live site I believe, if you want to run api calls against the sandbox the proper URL is https://www.sandbox.paypal.com/cgi-bin/webscr
The return URL is the page that Paypal redirects to after a transaction or cancel. There is no POST request associated with this, however..you can pass parameters into the URL (such as http://mysite.com/succes.php?amount=xxx) so that you can retrieve them later. This is a rather inconsistent way of doing things, though. Which leads to...
Look up the IPN documentation on Paypal (starting point: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro) This allows you to specify a URL which Paypal will POST the transaction details to after a transaction request.
Before you can store these details you need to do send back a request to Paypal to validate that the IPN was generated from Paypal (this is in the docs). After that you can store the details into your database.
精彩评论