Automate payments on my site

Could someone help me please? I would like to automate payments on my site and on notification from a 3rd party such as PayPal, generate a username and password and then send a download to the buyer. I would also like to record the buyer’s details.

I am happy to employ someone to do this for me and would be grateful of any recommendations. Alternatively, if there are any existing software packages available that could do this, I would love to know. Finally, I would be interested in learning how to do this myself so any tips or guidance would be great.

For doing it yourself, Paypal does offer moderately extensive documentation on how to do it - key words to look for are “IPN” (Instant Payment Notification). There are several premade scripts to interact with this feature, i’m sure, though the “what do i do with it now” section would by up to you.

It does vary depending on which payment method you use. In the past I have used PayPal and SecPay (who are now called something else) - PayPal had Instant Payment Notification which I didn’t implement, SecPay allowed you to define a “success” URL that they would call when a payment went through. That could pass an order reference or subscriber ID back to your site which would then allow you to activate the customer account. My guess is that IPN did pretty much the same. SecPay also defined a “failure” URL too. So basically the SecPay integration went:

my site - get customer details, store order and give it uid.
my site - present form with "OK" button, submit to Secpay
secpay - Get customers credit card details, process transaction
secpay - if approved, return to my "success" URL with uid, otherwise return to "fail" URL with uid
my site - success URL - activate account, send email to say so, enable downloads

The main thing for me was that I never saw the customers payment details, which meant I didn’t have to mess around with the enhanced security required for compliance, and I didn’t have to worry about whether my database was vulnerable. As I recall, the SecPay process also included MD5 hashing as some kind of security, the hash included a key-string that was never passed around between the sites.

Pretty much. IPN posts many of the details of the transaction back to your page (no CC info or such, obviously)

Thank you that is very useful.
I am afraid that the only code that I understand is CSS, so please forgive my naivety, but is that part of the PHP code I need to put on my site? I would not use it without permission, but it seems to be fairly straight forward, is this PHP?

The stuff I posted there is not remotely PHP - it’s just a basic pseudo-code description of the sequence of events showing what my site does before it hands off to the payment processor, and then comes back to my site.

You might find a payment platform that could make it simple enough, but you’ll need to implement some kind of database handling to store the buyers details. That will either mean finding something off-the-shelf or learning enough PHP (or something else, doesn’t have to be PHP) to write it for yourself. Off-the-shelf will be better if you don’t have the time or inclination to learn PHP and SQL, learning will (in my opinion) be better because you have total control over exactly how your side works, and who doesn’t want to learn new stuff?

1 Like

Thank you I appreciate your help.

I enjoy learning new stuff and agree that would be the best route to go down. However, due to time constraints, maybe I should implement a package “of the shelf” and then take a course or read a book. Can you suggest any?

Forget evil, nasty, PayPal, I highly recommend https://stripe.com/ which is very well documented and a joy to use.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.