Simply Paypal integration

Hello

The API example looks much more complex than I think I need. This is the process I want to use, but not really sure if it's correct. Is there a simpler example that just does step 3) here:

1) Buyer buys with "buy now" button which is simply the html code that Paypal provides for standard checkout.2) Paypal takes their payment info and processes the payment.3) Asynchronously, our code receives an IPN message from Paypal and then calls the LimlLM API to generate and email the product key.4) Paypal returns the user to our static thank-you page which says "check your email for your product key".

Specifically, I don't want to have access to the customer's credit card information which the example code seems to do. That's because this seems to involve even more risks and complications like PCI DSS compliance.

See: Automate license generation with PayPal. It's all pre-written, you just change a few configuration settings. You can disable the other payment options and just use PayPal.

See: Automate license generation with PayPal. It's all pre-written, you just change a few configuration settings. You can disable the other payment options and just use PayPal.

Thanks. That's the example I was referring to but it shows a form asking for a credit card number. Can I easily remove that form? Is there any documentation for the code? I'm new to any kind of web programming so I'll need to sift through the files by hand to work out what's going on and most of it won't be relevant to me.

Or could you suggest a file to use as starting point in learning how it works with the specific goal I mentioned in my first post? Is there one file that kicks things off?

Can I easily remove that form?

Yes. Change the settings in PaymentSetting.php/cs/vb (depending on the language you're using) and the form automatically changes depending on what payment providers you select. If you just select PayPal (and disable all the others) then no credit card field will be shown -- along with other changes.

Is there any documentation for the code?

The article I linked to.

I'm new to any kind of web programming so I'll need to sift through the files by hand to work out what's going on and most of it won't be relevant to me.

All of the product key generation stuff and the settings are in PaymentSetting.php/cs/vb. See here for what the other files do, etc.

Or could you suggest a file to use as starting point in learning how it works with the specific goal I mentioned in my first post? Is there one file that kicks things off?

There are 4 files. Each has its own purpose. Just follow the article and you'll be up and running in no time with minimal coding effort required.

It's becoming clearer. Since I don't want any kind of form or visible web page at all, I think I can get away with just

paychecker.phpPaymentSettings.phpLimeLM.php

Does that sound right? I'll just tell paypal to use paycheck.php for it's IPN.

Does that sound right? I'll just tell paypal to use paycheck.php for it's IPN.

Yes, but you got to make a few changes. Namely, tell the paychecker that it's getting a PayPal IPN. How do you do that? Well, look at the paychecker.php and scroll down to the first non-function (i.e. the first line of code that will be run).

After the debug_log(...) call you have this:

f ($_GET['paypal']){	// validate PayPal order	if (!ValidatePP())		exit;




...

Which means you have to pass "paypal=1" as a parameter to PayPal for that script. For example:

https://yousite.com/paychecker.php?paypal=1

Of course, before you get too deep into making modifications you should work with our example first and get everything working. Then gradually mold it into the shape you want.

Great. That would have certainly tripped me up!

Thanks for your help. Now it makes enough sense that I feel I won't be completely stabbing the dark.

Hi

I will really appreciate if you can post your solution. I am having real hard time with making the sample code behave. I am getting lots of errors. I want to implement the exact same solution as you have mentioned the post. With the sample code I got these many errors:Notice: Undefined variable: AuthNetBankSelected in E:\wamp64\www\PHP\payment.php on line 42Notice: Undefined variable: PayPalSelected in E:\wamp64\www\PHP\payment.php on line 292Notice: Undefined variable: MoneybookersSelected in E:\wamp64\www\PHP\payment.php on line 294Notice: Undefined variable: AuthNetBankSelected in E:\wamp64\www\PHP\payment.php on line 381

Did you add the "." path the the include search directories? http://php.net/manual/en/function.include.php

Did you include all of the files from that folder to your webserver (not just "payment.php")?

Yes i did.

OK... more information is needed if you still need help. A lot more information. For starters, use our unmodified payment example from the web API: https://wyday.com/limelm/api/#web-api-pack

Run it on your server without touching any of the files. Do you get an error? If so, then there's a problem in your PHP and/or HTTP server configurations. Fix the problem.

The examples run perfectly on all supported versions of PHP: 5.5.x, 5.6.x, and 7.0.x. We will always maintain compatibility with the latest versions of PHP. See which versions are supported here: http://php.net/