[Lift] Re: PayPal stuff

2008-10-23 Thread Tim Perrett

Hey Chas,

 Nice work, Dave and Tim.

Thanks :-)

 Here's a question that just popped into my head: How do you test this
 code without moving money around? How will I know my installation will
 work? Is there a way to fake it?

But of course - paypal provide a sandbox. Dont be fooled, this is a
live system, and can take money from your card so paypal provide a
bunch of dummy card numbers to use whilst testing. I recently read an
article where a guy had put in his real card on paypal sandbox and it
took like 1000 bucks from his account (so you've been warned!)

To use the sandbox, do something like:

// USING PDT
// YourSnippet.scala
PaypalDataTransfer(at, tx, PaypalSandbox, PaypalSSL) // = use the
sandbox over SSL

PaypalDataTransfer(at, tx, PaypalLive, PaypalSSL) // = use the live
system over SSL

PaypalDataTransfer(at, tx, PaypalSandbox, PaypalHTTP) = use the live
system over HTTP


// USING IPN
// Boot.scala

object Boot {
  def boot {
  ...
  // paypal stuff:

  LiftRules.statelessDispatchTable = MyPayPalHandler orElse
LiftRules.statelessDispatchTable

  }
}


object MyPayPalHandler extends PayPal {
  import PaypalTransactionStatus._

  override val mode = PaypalLive
  override val connection = PaypalHTTP

  def actions = {
 case (ClearedPayment, info, _) = // write the payment to the
database
 case (RefundedPayment, info, _) = // process refund
  }
}


So, to answer your question, the key to all this are the sealed types
PaypalMode, and PaypalConnection - then its just down to you to make
sure that you dont use your actual credit card in the sandbox ;-)

Make sense?

Cheers

Tim


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
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
-~--~~~~--~~--~--~---



[Lift] Re: PayPal stuff

2008-10-23 Thread Tim Perrett

Actually, as another note, if your thinking about using Paypal, then
please read this article:

http://www.pdncommunity.com/pdn/board/message?board.id=basicpaymentsmessage.id=368

Given the framework we've supplied, its a simple process to implement
both IPN and PDT which give you the safest and most reliable payment
verification.

Cheers

Tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
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
-~--~~~~--~~--~--~---



[Lift] Re: Scala+Lift Philosophical Question

2008-10-23 Thread David Pollak
On Tue, Oct 21, 2008 at 5:50 PM, efleming969 [EMAIL PROTECTED] wrote:


 Most questions in the group are technical and I apologize if this is
 not appropriate, but I I'm curious about how members are justifying
 their use of Scala+Lift vs. a traditional Java architecture.  I
 understand if you are creating applications for your own business or
 personal use, but what about employee or consulting work (if any).

 I'm currently a one man consultant and would like to do more work with
 Scala and Lift but it seems high risk for my client to have an
 application built with newer and practically unknown technologies like
 these.

 Any thoughts?


I force all my clients to use Lift and Scala. :-)

My experience with bringing other people onto Lift and Scala projects is
pretty positive.  Anyone who is polyglot (speaks Java + Ruby, C# + Java,
Ruby + JavaScript, etc.) seems to be just fine with Scala.  The folks who
only speak Java seem not to do so well with Scala.

Lift requires throwing away some assumptions... but so does Rails,
TurboGears, etc.  But, once you get into the Lift paradigm, you should be
very productive.

So... what are the risks to your client?

   - You get hit by a bus?  Arrange with Tyler or me or Viktor or someone
   else on the list to be your backup.  I'm the backup for a number of Scala
   projects.  I get one call saying If so and so disappears, can you take over
   the project? and that's that.  In 18 months of saying I'll be the backup
   I've never been called on.
   - You have to bring other people onto the project?  It's not different
   than any other project with a new framework.  There's little risk in choose
   Ruby or Grails... there's a similar low risk with choosing Lift.

Folks in the SAP community chose Lift for the ESME project.  If they're
doing Lift and Scala, why should your client worry?  The folks at Twitter
love Scala and say so publicly.  If the hipster Web 2.0 folks are using
Scala, you gotta figure there'll be a bunch of Scala lovers popping up in
Web 2.0 land.

My biased thoughts.

Thanks,

David



 



-- 
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://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 liftweb@googlegroups.com
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
-~--~~~~--~~--~--~---



[Lift] Re: Scala+Lift Philosophical Question

2008-10-23 Thread Warren Henning

On Thu, Oct 23, 2008 at 2:43 PM, David Pollak
[EMAIL PROTECTED] wrote:
 The folks at Twitter love Scala and say so publicly.

Off-topic: are you at liberty to discuss the extent of Scala usage at
Twitter? What, if anything, can you tell us?

Did they replace Rails with Scala/Lift?! :D

Warren

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
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
-~--~~~~--~~--~--~---



[Lift] Re: Scala+Lift Philosophical Question

2008-10-23 Thread David Pollak
On Thu, Oct 23, 2008 at 2:47 PM, Warren Henning [EMAIL PROTECTED]wrote:


 On Thu, Oct 23, 2008 at 2:43 PM, David Pollak
 [EMAIL PROTECTED] wrote:
  The folks at Twitter love Scala and say so publicly.

 Off-topic: are you at liberty to discuss the extent of Scala usage at
 Twitter? What, if anything, can you tell us?


http://groups.google.com/group/scala-base/web/TwitterOct2008.pdf




 Did they replace Rails with Scala/Lift?! :D

 Warren

 



-- 
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://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 liftweb@googlegroups.com
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
-~--~~~~--~~--~--~---



[Lift] binding nested groups

2008-10-23 Thread Charles F. Munat

I have a group of links that are assigned to categories.

I want to pull the links and categories down and output them like this:

Category A
   Link 1
   Link 2

Category B
   Link 3

...

Is there a way to do this with bind, or should I just build the XHTML in 
the snippet?

Thanks!
Chas.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
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
-~--~~~~--~~--~--~---