Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Brainmaniac's avatar

Integrate PayPal

Hi,

i am about to integrate the paypal smart buttons to my site. I want to do it with my server doing the place order call and also the handling of the response when it is done, not the client.

I must say that working with implementing paypal is hell compared to integrating stripe... Ok, so my question. I am trying to install the paypal SDK to be able to let my server handle the purchase. https://developer.paypal.com/docs/checkout/reference/server-integration/setup-sdk/

... I have changed in the file samples/PayPalClient.php so that I have my sandbox credentials.. BUT when installing with composer the SDK stuff ends up in the gitignored vendor folder. And now I am manually changing stuff in it. This can't be right. So how do I install the paypal SDK?

0 likes
10 replies
furqanDev's avatar

Are you trying to integrate Paypal in Laravel or custom PHP project ?

Brainmaniac's avatar

@furqanDev tnx

Interesting package that is linked in the article. It does seem kind of extensive for what I am trying to do

martinbean's avatar

@Brainmaniac Because at some point you need to write code instead of expecting a package or tutorial giving you something to copy and paste.

Brainmaniac's avatar

@martinbean woaw, easy now. I don't mind writing code. It is just that I find the documentation from paypal underwhelming. Compared to stripe's the paypal documentation is a nightmare.

martinbean's avatar

I have changed in the file samples/PayPalClient.php so that I have my sandbox credentials.. BUT when installing with composer the SDK stuff ends up in the gitignored vendor folder. And now I am manually changing stuff in it. This can't be right. So how do I install the paypal SDK?

@brainmaniac Yes. You should be treating the samples as samples, and using the code as an example for your own code.

Please or to participate in this conversation.