cancel
Showing results for 
Search instead for 
Did you mean: 

How to start with PayPal payment button ?

New Community Member

How to start with PayPal payment button ?

Hi

 

For the last 13 years, I used to have some PayPal buttons on my website with IPN (notifications of payment) back to my server. It worked fine, until 1 or 2 years ago. Today I do not get anymore IPNs.

Today I try to fix it, but the online documentation is not very clear.

 

I have read the basic integration doc online (https://developer.paypal.com/docs/checkout/integrate) and I have tried to make a test. It doesn't work at all. It's all about Javascript and some variable are not defined, like the paypal variable.

 

Here is the code for instance :

 

<body>
<div id="paypal-button-container"></div>

<script>
paypal.Buttons().render('#paypal-button-container');
</script>
</body>

 

 

Safari tells me that paypal variable is not known. How can I know if this has been defined in Javascript PayPal source ? I can't. 

 

Server side :

 

a function is defined : function handleRequest(request, response)

 

What are the variable request and response ??? Where do they come from ? How do I get them ?

 

Generally, the IPN is received by a script that is defined into the client button code. And I read the IPN data (which are POST data) in this file.

 

I really don't understand how this works.

 

 

Can you help ?