PayPal in WinDev

PaypalWhen we think “payment”, we quickly associate this word with “online”. In most cases, payment is supported by a website/online store. When making software in WinDev, matching the payment made on via your website and a license key increases the administrative work. In this process, the customer also experiences a delay between his payment and the activation of his software.

Apart from an old component based on an old API of PayPal (and therefore no longer functional), no other development has allowed the recent use of this payment platform directly from a WinDev application.

Here is a solution to easily integrate the purchase “in-App” in a WinDev application (without using APIs) inspired by PayPal documentation.

This opens up huge opportunities as customers can :

  • Download the software and pay for it (and therefore activate it) during installation or first run;
  • Unblock software that is bridged in demo;
  • Activate additional options on the fly;
  • Pay a bank of hours for access to technical support;
  • Make micro-payments when using a function in the software/adding a file, …

This requires : 

A PayPal account (obviously!)

  1. Open a PayPal account (it is strongly suggested to have a “professional” account if you expect to receive regular payments);
  2. Create your real API key (the one that will receive your payments);


  3. Go to the site for developers and create a “business” account and its associated “sandbox” API key to do your tests (this is the account that receives the payment) and another “personal” account (This is the one that will allow you to pay during your tests);

A public web server with an SSL certificate
If you already have a secure website (read with SSL certificate), go to the next step. Otherwise, choose a host (OVH, Amazon, GoDaddy, …) where you will order the address of your payment platform (ex : www.mespaiements.com) and your SSL certificate.
2 HTML files
Then, just send, by FTP, the 2 HTML files at the root (p.e. in the public_html folder). Use FileZilla and the FTP information provided by your host.
A payment window

  1. Create a window where the customer can make the payment
  2. Put an ActiveX field in it and choose “Microsoft Web Browser”
  3. Initialize the ActiveX field with these two lines :
    AX_SansNom1>>Navigate2(“https://www.monsiteinternet.com/paypal.html?amt=0.12&cur=EUR”)
    ActiveXEvénement(“Authorized” ,AX_SansNom1 ,”TitleChange”)
    And finally an “Authorized” procedure in which you put : Trace(AX_SansNom1>>LocationURL)
    During the GO of the window, you will see the PayPal payment button appear in the ActiveX field. By clicking on it, a popup page will open directly on the PayPal.com website. The customer then puts his payment information and validates the form. Once done, the popup page closes and calls the paypalok.html page of your site. The client sees (in this example) the text “OK” in the ActiveX field. The “Authorized” procedure intercepts the page title and can then react as soon as you detect the address of your page “paypalOK.html” from your site.





How much does it cost ?

  • PayPal transaction fees are documented here, ie 3.4% of the amount of the transaction + € 0.25 (decreasing according to the transaction volume)
  • You can have a free website with 10MB of disk space at OVH included with the price of your domain name, itself between 3 and 20 € per year (depending on whether it’s a .com, a .net, a .fr or other). No need to install anything other than the 2 HTML files.
  • An SSL security certificate to install in your administration console of your domain name. Free at some providers (thanks to Let’s Encrypt) when buying web hosting (between 1.5 € and 20 €/month). Otherwise you’ll pay between 50 € and 100 €/year.
Ce site n'a aucun lien avec la société PC SOFT®. Les marques "WinDev" et "WebDev" sont des marques déposées de la société PC SOFT.