Log in

View Full Version : Show page after PayPal payment



ianhaney
12-31-2015, 12:25 AM
Hi

I am looking for advice, I need a user to see a php page with a job advert form on only once PayPal payment has been received which I know how to do and is working but I need the user to be only allowed to submit the job advert form once and if they want to add a new job advert then they need to pay via PayPal again

Is this possible to do

Thank you in advance

Ian

Beverleyh
12-31-2015, 06:28 AM
Could help http://stackoverflow.com/questions/6980553/accessing-a-page-only-after-a-paypal-payment-has-been-made plus there are links to the PayPal API and tutorials in the comments - one-time payments looks promising https://developer.paypal.com/docs/classic/express-checkout/ht_ec-singleItemPayment-curl-etc/

ianhaney
12-31-2015, 09:36 AM
Hi Beverley

Thank you for the reply and the links, I am looking at the paypal one time payment but unsure how to code it in my php page and what if the user adds a job and then goes back to the same url a minute later and adds another job, they can add another job without paying?

Would you be able to help me on this as I can't find any sample coding that I can use to get me started?

Thank you in advance

Ian

Beverleyh
12-31-2015, 10:03 AM
Sorry I haven't really looked at it so I don't know how it would work.

If I have time when I'm back in the office I'll try and look at it in more detail, but I can't promise anything around my other work.

ianhaney
12-31-2015, 10:06 AM
That's ok no worries, thank you for taking a look when you can, appreciate it

In the mean time, I'll keep looking around on Google and see if can find any sample code for it to start me off

ianhaney
12-31-2015, 10:27 AM
I found the following link that looks quite straight forward but I already have paypal ipn so not sure if is best to get rid of that coding and use the coding from the following link

http://knowledge.santanu.net/paypal-one-time-and-recurring-payment-using-web-form-and-ipn/

I did think what if I just add a cancel url in, would that prevent them from accessing the page after paying and visiting it once so if they try to visit it a second time it will just redirect them to the cancel url I put in?