PAYPAL integration steps

I would appreciate if anybody tell/sketch me the steps that I have to implement in order a user to automatically pay a product s/he bought.
For example lets say that the first thing is to authenticate user’s paypal account… What next steps in a row?

If anybody knows an add-on that facilitate the whole process,please let me know.
Michael

This could probably help :
https://developer.paypal.com/

https://developer.paypal.com/search/?q=ipn

https://www.example-code.com/xojo/paypal.asp
Although the examples are very clear, my problem is that I don’t know which actionw one has to complete in order to pay a given product. The related piece of code (examples) are separate and as I am not very experienced with the whole paypal process to fit them together.

Thank you, Michael… how can integrate and use Payment buttons in Xojo app?

A payment button is just a piece of HTML + JavaScript code. The simplest way to go is to show it in a WebHTML Viewer.

When you create a button, you get two options : a chunk of code, or a link.

The link may be easier to use within a WebPage.

May I suggest you open a debug account, so you can play with the different features.

I think a chunk of the solution involves receiving data back from PayPal which allows the code to see that a payment has indeed been processed, and to add in account related data to the app’s data store - such as adding a paid-for download or access key to a customer’s account.

It is exactly what Instant Payment Notification (IPN) does. I linked to it above.

I use a Web 1.00 program handleURL web service on my web site, which Paypal posts to when a transaction took place. After verifying that payment is complete, I can then deliver software by download right away.

Oh, yeah… IIRC, IPN delivers a set of data and you just handle the incoming data?

Not sure how that all works. Hoping my poor brain can UN-fry itself after a seventy-hour work week.

Correct. The IPN that your app would receive contains a payload that provides all of the information about the transaction and it’s up to you to do something with it. Typically, store the IPN data in a database, send out an email receipt, then activate an account/feature or provide a download.

PayPal’s IPN is really easy to use.

1 Like

Thank you.
Pennies drop.
As I am not so advanced programmer is there any demo code to do that and setting all thinks properly.
Database stuff and thecrest is easy i need only the give and take data from paypal.
Best wishes
Michael

I have some old chilckat libray i coukd experiment with but i prefer a ready made solution

There are code examples and guidelines here:
https://duckduckgo.com/?q=ipn+github&ia=web

You do not need plugins to achieve this.

1 Like

Indeed, my IPN listener does not use any plugin.

But Paypal examples do suggest the use of Curl, and MBS plugins provide that.

2 Likes

It does not exist any xojo mplementation of paypal/ipn.
One has to be a proper programmer in other languages to use it.
Why is that, this important piece of code not translated from xojo experts to xojo code and put in the examples code… I wonder

1 Like

I am going to implement my code around this code.

https://www.example-code.com/xojo/paypal_show_payment_details.asp

Is that possible?
Do you think that is going to work or i missed something?
Anything i need to change in that code in order to make it work?

Thanks in advance…

Xojo is our favorite development tool, but it is not that common. As a matter of fact, it is most of the time not even mentioned in the Tiobe index.

My first use of a Paypal listener was in Perl, a long time ago.

I am not so sure this example is for an IPN listener. It does not look as if it can receive an HTML POST.

At first glance, it taps into the API, so it looks as if it carries a purchase.

1 Like

I would love to release the code I use in my IPN, but it is a tad complex, since I carry a lot there.

I also have to update it to curl.

When that is done, perhaps around the end of the year, I may post a simplified version.

3 Likes

This is wonderful Michel !!!
Please allow me to send you s reminder from time to time :slight_smile: Also I would suggest ro support xogo2018 release and put the needed comment on the code.
Best wishes
Michael

So if it carries a purchase i could check if the purchase had been done by parsong the jadon string and manage them properly (updaye database record etc).
Is that correct?