Daniel Holth wrote:
> makePayment is called when the "Make Payment" button is pressed after
> entering credit card information. I noticed the condition function is
> called 3 times, but when I subclass it /my/ make-payment condition is
> called 5 times! Does anyone know why it doesn't just check once?
> 

The checkout mechanism is kind of a mess.  When I got getpaid.paypal to work, I 
ended up overriding the whole checkout wizard and replacing it with my own - I 
could find no clean way to override the various parts of the existing wizard.

> My problem is that the frm instance doesn't have all the data filled
> in the first time condition is called, but it does have that
> information on successive calls. If I can't give the right answer on
> the first call, the user sees the credit card entry form again instead
> of progressing to the "Order submitted" page.
> 

I think it does that on purpose.  It looks like the code is designed to work 
with XML- or JSON-based credit card processing systems only, and fails 
miserably 
at any other attempt.

> Thanks,
> 
> Daniel Holth
> 
> def haveInputWidgetsAndPrint(frm, action):
>     print "form.haveInputWidgets"
>     return form.haveInputWidgets(frm, action)
> 
> class CheckoutReviewAndPay(BaseCheckoutForm):
> 
>     ...
> 
>     @form.action(_(u"Make Payment"), name="make-payment",
> condition=haveInputWidgetsAndPrint )
>     def makePayment( self, action, data ):
>         """ create an order, and submit to the processor
>         """
>         manage_options = IGetPaidManagementOptions( self.context )
>         processor_name = manage_options.payment_processor



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"getpaid-dev" 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/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to