Friday, November 30, 2012

Paypal Integration

http://developer.paypal.com

create account pre-configured account
create a personal / buyer
create a business / seller

Enter Sandbox test site

go to profile > My Settings >

Under Account Information
> API Access
https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_profile-api-access

View API Signature
Get your
API Usernamexxxxxx.xxxx.xxx
API Passwordxxxx
Signature xxxxxxx--xxx-xxxxxx


https://www.paypal-labs.com/integrationwizard/index.php

Choose Express Checkout - Digital goods

Follow the process...
Click Next

Start Wizard

Enter url for confirm.php and cancel.php

http://localhost/confirm.php

http://localhost/cancel.php



Create index.html ... product page

For the Button
Copy the 2a. Creating Button: Insert this code snippet on the page that will have Pay with PayPal button.* 

Copy Before closing the HTML tag </html>
2b. Adding in-context experience: Insert this code snippet before the closing of the html body tag. 

Download paypalfunctions.php
Same folder of your app... root


Create checkout.php... copy the code

3a. Insert this code snippet into the section of your code that initiates Payment. 


Create cancel.php... copy the code

3c. Insert this code snippet into the section of your code that handles Payment Cancellation 

Create confirm.php or/and orderconfirm.php... copy the code

test your code...




No comments:

Post a Comment