Jump to content

Recommended Posts

I have a website which shows lots of products by PHP/mysql database. Currently only cash payments are available.

 

I want to add PayPal in, which I've never done before. Having looked at the integration guides, I found the PayPal payments standard bit but with this you need PayPal's buttons. If you have the add to cart buttons, apparently you need to write out each product into PayPal which shouldn't happen as the products are generated by a while loop so I should only paste the code once, but it looks like this needs to be posted individually for each product.

 

Ideally I'd have the PayPal code only happen if the user chooses PayPal at the cart, and then send them to PayPal. The cart products, prices, options and option prices are all in session arrays.

 

Is this possible? Is there a better way?

Link to comment
https://forums.phpfreaks.com/topic/297196-paypal-integration/
Share on other sites

Yes, Paypal has an API that handles everything.  You send the total amount of the sale, along with the sale items, then the payer approves the sale.  

I haven't used the new API, as it has been a few years since I did paypal integration.  I just looked over the API, and it seems to be more complex than it used to be (payments are now 3 step processes).  So, yeah, have fun with that.

Things to think about:

Do you want Paypal to handle credit card info?
If not, does your site have SSL? (it will need to).

Anyway, start here http://https://developer.paypal.com/docs/integration/web/accept-paypal-payment/

Link to comment
https://forums.phpfreaks.com/topic/297196-paypal-integration/#findComment-1515729
Share on other sites

That question is best left to you based on your needs/wants, but the normal I would say is "payments standard".  It really also depends on how much $$ you're going to push through paypal.  The payments standard doesn't have a monthly merchant fee, but has higher transaction fees.  So if you do lots of $$, then paying a little merchant monthly fee will likely outweigh the savings of lower transaction fees per transaction.

Link to comment
https://forums.phpfreaks.com/topic/297196-paypal-integration/#findComment-1516218
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.