Sunday, January 31, 2010

Creating paypal shopping cart

Before finishing the my project http://www.biznesmakler.pl I found that client wants me to change payment procedure through paypal. He wants a way to perform payment by buyer to paypal without login to paypal account that means payment with credit card only. Apparently I found that there is no available way for payment without login to paypal account. Actually, if anyone has a paypal account he wont be able to make payment to paypal without login according to current strategy...that if paypal checks a credit card for once it has a record for that card and it will prompt for registration next time. As I was trying to integrate with paypal in express checkout and it needed login to paypal for account confirmation.

Anyway, I thought there is no way to pay without login..but there is. And the only exclusive way to make payment is payment with shopping cart. And its quite east to integrate the site paypal shopping cart techniques. Lets summarize the way of paypal shopping cart integration.

1. Login to paypal business account
2. Click Merchant service tab
3. Select create New Button Link. After a process of creating button you will be provided with the button code with a button id.
4. Now you can redirect your buyer for payment in this way. Here is the code.


//redirect to option 1 button
StringBuilder builder = new StringBuilder();
builder.Append(bizcart.scartPostURL);
builder.Append("&cmd=_s-xclick");
builder.Append("&hosted_button_id=" + bizcart.valuationOption1ButtonID);
paypal_redirect_url = builder.ToString();


Here bizcart.valuationOption1ButtonID is the button id we have generated.
Thats the way to work with paypal shopping cart.

Masud. (31.1.2010)

No comments:

Post a Comment