Author |
Topic |
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 September 2004 : 06:25:44
|
Hey, all, been away from here for a while due to some pretty hectic happenings offline. Only back for a flying visit at the moment to ask if anyone has implemented or if anyone knows of a subscription service for Snitz. We're looking for something automated that we could, preferrably, run through PayPal. Upon paying the member's record in the database would need to be updated with a custom M_LEVEL and the expiration date (custom field) of their subscription. I have the code to do this, the only thing I need to figure out is how to trigger the change once they've paid. Any help/insight greatly appreciated.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
Podge
Support Moderator
Ireland
3775 Posts |
|
redbrad0
Advanced Member
USA
3725 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 September 2004 : 11:29:34
|
Thanks, guys.
Podge, you got linkage to their classic ASP API? I could only find the .NET one.
Brad, you mind if I contact you if I need more info?
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
Podge
Support Moderator
Ireland
3775 Posts |
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 15 September 2004 : 13:55:01
|
Shaggy your more welcome to shoot me over a email.
You need to be looking at PayPal IPN which basically you will see a buy now button which will send them to paypal to pay. As soon as they pay, paypal sends you back some info to a given url which you grab the info, send back to paypal to verify that its correct. Paypal will then verify that the payment was correct and then in your page you can upgrade the users membership. This is all done without the user ever knowing it because paypal sends the customer back to your site while there servers request the page that will do all the work. Hopefully this will make a little since to you. |
Brad Oklahoma City Online Entertainment Guide Oklahoma Event Tickets |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 15 September 2004 : 19:14:27
|
Welcome back, Shaggy!
Thanks for bringing up this discussion. It is of great interest to me as well.
Etymon
|
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 16 September 2004 : 04:21:24
|
Thanks for all the response, guys; much appreciated.
Yup, finally PayPal added support for those of us in Ireland, something I've been waiting for - and pestering them about - for a loooong time!
Found the IPN buried away in the Merchant Tools after clicking around for a while last night and looks simple enough to integrate (famous last words); just got to work out how to pass MEMBER_ID back and forth between PayPal and ourselevs, think that might be what the custom field is for. I'll keep ye all posted on how I get on and, once I get this new site and MeTV's redesign out of the way, I'll try to find time to package it up as a mod.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
Edited by - Shaggy on 16 September 2004 04:42:14 |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 16 September 2004 : 10:50:59
|
Yes use the customid field to pass the members id. One of the hard parts about the script is that you can not see any asp errors in your IPN script because you can not run or process that page. Best way to test it is by using a .01 penny. You also need to make sure you check the amount that is sent thru because people will spoof the amount and you can refund the payment thru your ipn script if they send a invalid amount thru and then send them back a email to let them know. There are a ton of things you can do to make the ipn script work great to where it even handles refunds and everything. |
Brad Oklahoma City Online Entertainment Guide Oklahoma Event Tickets |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 16 September 2004 : 11:16:45
|
Thanks, Brad; answered a few questions. Going to get started on it now and I'll probably get back to you in a couple of days for a bit more help with refunds etc., if that's OK?
One quickie right off the bat, though: PayPal recommend you keep track of transaction IDs to prevent people from spoofing prebiously completed transactions. How do you do this? Do you store them in a database table or use some other method?
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 17 September 2004 : 12:13:33
|
Thanks for your help so far, Brad; really appreciate it.
Started working with the IPN yesterday and made quite a bit of progress in processing the subscription and making the necessary database changes and also with procesing refunds & cancelling the subscription.
Still a couple of things I'm not sure how to handle, which you can see commented out with '# here. Can you offer any insight as to what action I should be taking in each case?
Breakdown of error messages, just in case anything's unclear (knowing me, this is more than likely!).
HTTP Error (line 37): Action to take of PayPal does not return a 200 status message.
Invalid Item (line 80): Action to take if item number/name does not exist.
Invalid Member ID (line 83): Action to take if variable passed in custom field is not a valid MEMBER_ID.
Wrong Currency / Amount (line 86): Action to take if payment received is not €9.99 (subject to change).
Wrong E-mail Address (line 89): Action to take if email address payment was sent to is not one of ours.
Duplicate TXN ID (line 92): Action to take if Transaction ID is the same as a previously processed transaction.
Transaction Failed (line 95): Action to take if PayPal returns "Failed" in the payment_status field.
Invalid Transaction ID (line 117): Action to take if Parent Transaction ID is does not match any existing Transaction IDs in the database.
Already Refunded / Denied (line 120): Action to take if Parent Transaction ID is the same as the Transaction ID of a previously refunded subscription.
Error (line 123): Action to take if PayPal returns anything other than "Completed", "Pending", "Failed", "Denied" or "Refunded" in the payment_status field.
Error (line 126): Action to take if PayPal returns "INVALID" as the ResponseText.
Error (line 129): Action to take if PayPal returns anything other than "VERIFIED" or "INVALID" as the ResponseText.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 21 September 2004 : 05:51:04
|
So, we don't need to take any action at our end with those errors?
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
Edited by - Shaggy on 21 September 2004 05:51:31 |
|
|
Topic |
|