Support forum
wyDay blog
wyDay Home

Automate license generation with PayPal

PayPalThis article will tell you how to sign up for PayPal and how to configure the settings for the payment form we talk about in the How to generate product keys after an order article. If you haven't read that article first, you should.

Create a sandbox account

If you want to test the PayPal integration without using your real money then you will need to create a PayPal sandbox account.

Using the payment example in the LimeLM Web API Pack

Use our pre-made, fully configurable, payment examplesIncluded in the LimeLM Web API Pack is a payment example for C#, VB.NET and PHP. To configure this payment form to accept PayPal as a form of payment you need to make a few configuration changes. First, open the PaymentSettings.php/.cs/.vb file and make the following configuration changes:

  1. Set the "UsePayPal" variable at the top of the file to "true"

  2. Set the "AppPrice", "Currency", and "CurrencySign" variables.

  3. Set the "LimeLM_ApiKey" (get it on your settings page) and "LimeLM_VersionID" variables.

  4. Set the "CheckScript", "BuyPage", and "ThankYouPage" variables to the publicly-accessible locations of the included pages.

  5. Set the "PayPalEmail" variable with the sandbox email you created earlier and set the "PayPalSandbox" variable to "true".

Optionally set your logo

You can customize the PayPal payment screen with your own logo. The logo must be hosted on a secure site — that is, the link must start with https:// not http://. Also, the logo must be at most 150px wide and 50px tall. If you have a logo that meets those requirements then set the "YourLogo" variable in the PaymentSettings.php/.cs/.vb file. This is an example showing what the wyDay logo looks like on the PayPal checkout page:

Example showing the wyDay logo on the PayPal checkout

Test the payment form

Now that you have everything configured you're ready to test your PayPal payment. Run through the complete payment process to see everything works how you expect it to work.

Create a real PayPal account, change the setting

After you've finished testing your payment process you're ready to sign up for a real PayPal "Business account" and change the "PayPalEmail" variable in PaymentSettings.php/.cs/.vb to the email you used to create this account and set the "PayPalSandbox" variable to "false".