• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

SQL/PHP Paypal Question

Scarpozzi

Lifer
I'm setting up a site that's selling tickets to an event. Someone logs in to the site and they're presented with a pay now button to a Paypal account.

After they pay at Paypal, I want to update my db so I know how many tickets they bought. Paypal lets me direct them to a confirmation page of my choice...I'd like to set this page up so it updates a couple of attributes in the DB.

How would I code this in PHP? Everything I have going to php requires a post or submit action and I'd like it to be transparent to the user.

Thanks.
 
Go look up PayCrap's API... I'm sure they have it on their website. Or better yet, use a real payment service like Google Checkout.
 
Originally posted by: SunnyD
Go look up PayCrap's API... I'm sure they have it on their website. Or better yet, use a real payment service like Google Checkout.
Not my choice...I'm just volunteering my time on the site.

They have a straight-up button generator that basically throws all of their variables in. This makes it easy on the paypal side... The problem is that when the user clicks that button, they go to paypal and I can't confirm whether or not they actually made the payment until they get redirected back to my site. So, the API isn't going to help. I need to know how to update a variable without requiring a user click.
 
It's easier if you use their IPN system. You basically set a callback URL and through a series of POST requests you will get notifications of payments/signups or whatever you specify in your paypal link.
 
sounds like setting up zencart or oscommerce would be faster and more functional - both php carts have all that functionality built in.
 
I figured it out. There was something wrong with the query for some reason. (I still don't know what). When I tried to execute it the first time it was only setting the local vars. It's working now....a lot simpler than using Paypal's crap. They have way too much data for this project...I was able to do what I needed with 3 variables.
 
PayPal's IPN is the method that you need to do this to guarantee accuracy and security.

The "Thank You" page does not tell you that payment was actually processed...meerly that the customer went through the process of paying. IPN tells you that payment was actually processed and that everything is complete. The "Thank You" page is not verification.
 
Originally posted by: drebo
PayPal's IPN is the method that you need to do this to guarantee accuracy and security.

The "Thank You" page does not tell you that payment was actually processed...meerly that the customer went through the process of paying. IPN tells you that payment was actually processed and that everything is complete. The "Thank You" page is not verification.

Unfortunately, PayPal IPN is far from reliable. IPN is regularly down and/or delayed. I would recommend a method of TransactionSearch if you still need to retrieve payment info.
 
Originally posted by: Furor
Originally posted by: drebo
PayPal's IPN is the method that you need to do this to guarantee accuracy and security.

The "Thank You" page does not tell you that payment was actually processed...meerly that the customer went through the process of paying. IPN tells you that payment was actually processed and that everything is complete. The "Thank You" page is not verification.

Unfortunately, PayPal IPN is far from reliable. IPN is regularly down and/or delayed. I would recommend a method of TransactionSearch if you still need to retrieve payment info.

It's far more reliable then hoping the user clicks on a link 🙂

In general, paypal and their API's suck. Try dealing with subcriptions only to have to a payment notification come through before you get a subscriber signup notification!

In production though, most of the IPN notifications would come through a few seconds after the transaction was completed and with some extra coding it's pretty easy to get around out of order notifications.
 
Back
Top