Just for completness sakes, if your reading this and thinking your not
sure what ITN is, that would be because dave meant to say "IPN".
The only think I have to say is that perhaps we should change "PayPal"
to be "Paypal" so that the style throughout the code is consistent?
Otherwise, thats sterling work; really like what you've done with the
DispatchPf stuff - had no idea that you could break it out into parts
of the framework like that. Super sweet!
I've just updated Paypal.scala with a bunch more scala docs too.
Cheers
Tim
On Oct 23, 1:27 am, "David Pollak" <[EMAIL PROTECTED]>
wrote:
> Folks,
>
> I took the excellent stuff that Tim did for the PayPal stuff and refined it
> even more... and made it a tad more "Lift-ish".
>
> PayPal has two mechanisms for talking to it. PDT and ITN.
>
> PDT transactions happen when a customer finishes an PayPal transaction and
> returns to your site. The browser has 2 parameters (tx and at). You can
> ask PayPal if the transaction was really authorized by making a "PDT" call.
>
> You would do this in the following way:
> PaypalDataTransfer(at, tx, PaypalSandbox, PaypalSSL)
>
> This will return a PaypalResponse. The PaypalResponse can be queried for a
> PayPalInfo object via: PaypalResponse.payPalInfo: Can[PayPalInfo] If the
> transaction was successful, you'll get the information about the transaction
> from the PayPalInfo (name, address, transaction amount, etc.)
>
> ITN transactions are initiated by PayPal and are POST requests made on your
> site. As PayPal processes various transactions, it will make POSTs on your
> server. You must verify these transactions (or else someone could spoof
> PayPal transactions on your site) by asking PayPal if it made the POST.
> Once PayPal verifies the transaction, you take some action (e.g., updating
> an account value).
>
> To do this:
>
> object MyPayPalHandler extends PayPal {
> import PaypalTransactionStatus._
> def actions = {
> case (ClearedPayment, info, _) => // write the payment to the database
> case (RefundedPayment, info, _) => // process refund
> }
>
> }
>
> and in Boot:
>
> LiftRules.statelessDispatchTable = MyPayPalHandler orElse
> LiftRules.statelessDispatchTable
>
> Each time PayPal does an ITN on your server, the action will be performed
> (after the ITN it validated).
>
> Questions?
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Collaborative Task Managementhttp://much4.us
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---