Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: paypal ipn


Message #1 by "John Kinane" <john@k...> on Mon, 21 Jan 2002 11:07:39 -0500
I hope this isn't too off-topic for this group. Access is being used as my database so I thought I'd

ask....



Does anyone have experience configuring PayPal's Instant Payment Notification feature using ASP?

I've tried a couple ways to no avail.  What's suppose to happen as far as I know is the transaction

data is supposed to be bounced back to my DB.  I'll wait to see if anyone has done this before I

paste the code.



Thanks!

John



Message #2 by "Spencer Saunders" <ssaunders@i...> on Tue, 22 Jan 2002 08:46:40 -0500
I am actually about to set that up on a site this week. Probably  Friday.

What problems are you having? Is it just simply that your DB doesn't seem to

be getting the PAYPAL form info?



~spence~

----- Original Message -----

From: John Kinane <john@k...>

To: Access ASP <access_asp@p...>

Sent: January 21, 2002 11:07 AM

Subject: [access_asp] paypal ipn





> I hope this isn't too off-topic for this group. Access is being used as my

database so I thought I'd

> ask....

>

> Does anyone have experience configuring PayPal's Instant Payment

Notification feature using ASP?

> I've tried a couple ways to no avail.  What's suppose to happen as far as

I know is the transaction

> data is supposed to be bounced back to my DB.  I'll wait to see if anyone

has done this before I

> paste the code.

>

> Thanks!

> John

>

>




$subst('Email.Unsub').



Message #3 by "John Kinane" <john@k...> on Tue, 22 Jan 2002 08:57:47 -0500
yes, thats exactly it.  It doesn't seem to do anything.



here is the code I have so far...



Dim str, OrderID, Txn_id, Payment_status

Dim objHttp

str = Request.Form

OrderID = Request.Form("item_number")

Txn_id = Request.Form("txn_id")

Payment_status = Request.Form("payment_status")

' post back to PayPal system to validate

str = str & "&cmd=_notify-validate"

set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")

objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false

objHttp.Send str

' Check notification validation

if (objHttp.status <> 200 ) then

' HTTP error handling

elseif (objHttp.responseText = "VERIFIED") then

' process payment

  Dim rsTransactions, TransactionsSQL

  Set rsTransactions = Server.CreateObject("ADODB.Recordset")

  TransactionsSQL = "SELECT txn_id, txn_type, payment-date, payment_gross,

payment_fee, PersonID, first_name, last_name, address_street, address_city,

address_state, address_zip, address_country, address_status, payer_email,

payer_status, payment_method, notify_version, verify_sign, payment_status,

payment_reason, item_name, item_number, quantity, receiver_email FROM

Transactions;"

  rsTransactions.Open TransactionsSQL, objConn, adOpenDynamic,

adLockOptimistic, adCmdText



  rsTransactions.AddNew



  rsTransactions("txn_id") = Request.Form("txn_id")

  rsTransactions("txn_type") = Request.Form("txn_type")

  rsTransactions("payment_date") = Request.Form("payment_date")

  rsTransactions("payment_gross") = Request.Form("payment_gross")

  rsTransactions("payment_fee") = Request.Form("payment_fee")

  rsTransactions("PersonID") = Session("PersonID")

  rsTransactions("first_name") = Request.Form("first_name")

  rsTransactions("last_name") = Request.Form("last_name")

  rsTransactions("address_street") = Request.Form("address_street")

  rsTransactions("address_city") = Request.Form("address_city")

  rsTransactions("address_state") = Request.Form("address_state")

  rsTransactions("address_zip") = Request.Form("address_zip")

  rsTransactions("address_country") = Request.Form("address_country")

  rsTransactions("address_status") = Request.Form("address_status")

  rsTransactions("payer_email") = Request.Form("payer_email")

  rsTransactions("payer_status") = Request.Form("payer_status")

  rsTransactions("payment_method") = Request.Form("payment_method")

  rsTransactions("notify_version") = Request.Form("notify_version")

  rsTransactions("verify_sign") = Request.Form("verify_sign")

  rsTransactions("payment_status") = Request.Form("payment_status")

  rsTransactions("payment_reason") = Request.Form("payment_reason")

  rsTransactions("item_name") = Request.Form("item_name")

  rsTransactions("item_number") = Request.Form("item_number")

  rsTransactions("quantity") = Request.Form("quantity")

  rsTransactions("receiver_email") = Request.Form("receiver_email")

  rsTransactions("payment_fee") = Request.Form("payment_fee")

  rsTransactions.Update

  rsTransactions.Close

  Set rsTransactions = Nothing

elseif (objHttp.responseText = "INVALID") then

' possible fraud

else

' error



end if



what I'm expecting to happen is to receive POST variables back from paypal

so I can then populate my database.  I haven't included any error handling

yet, not sure how to proceed on this yet.  Nothing seems to be going to my db.  I'm assuming that

there's something 'm not understanding correctly.



TIA



John

----- Original Message -----

From: "Spencer Saunders" <ssaunders@i...>

To: "Access ASP" <access_asp@p...>

Sent: Tuesday, January 22, 2002 8:46 AM

Subject: [access_asp] Re: paypal ipn





> I am actually about to set that up on a site this week. Probably  Friday.

> What problems are you having? Is it just simply that your DB doesn't seem to

> be getting the PAYPAL form info?

>

> ~spence~

> ----- Original Message -----

> From: John Kinane <john@k...>

> To: Access ASP <access_asp@p...>

> Sent: January 21, 2002 11:07 AM

> Subject: [access_asp] paypal ipn

>

>

> > I hope this isn't too off-topic for this group. Access is being used as my

> database so I thought I'd

> > ask....

> >

> > Does anyone have experience configuring PayPal's Instant Payment

> Notification feature using ASP?

> > I've tried a couple ways to no avail.  What's suppose to happen as far as

> I know is the transaction

> > data is supposed to be bounced back to my DB.  I'll wait to see if anyone

> has done this before I

> > paste the code.

> >

> > Thanks!

> > John

> >

> >




> $subst('Email.Unsub').

>

>




>




  Return to Index