Exemple #1
0
 def get_variant(self, order, typ, form):
     factory = payments.factory(typ)
     payment = factory.create_payment(currency=order.currency,
                                      total=order.total().gross)
     payment_variant = models.DjangoPaymentsVariant.objects \
                             .create(payment=payment, order=order, price=0)
     return payment_variant
Exemple #2
0
 def create_variant(self, order, form, typ=None):
     typ = typ or order.payment_type
     factory = payments.factory(typ)
     payment = factory.create_payment(currency=order.currency,
                                      total=order.total().gross)
     payment_variant = models.DjangoPaymentsVariant.objects.create(
         payment=payment, order=order, price=0)
     return payment_variant
Exemple #3
0
 def save(self, order, form, typ=None):
     typ = typ or order.payment_type
     factory = payments.factory(typ)
     payment = factory.create_payment(currency=order.currency,
                                      total=order.get_total().gross)
     payment_variant = self.payment_class.objects.create(payment=payment,
                                                         order=order)
     return payment_variant
Exemple #4
0
 def save(self, order, form, typ=None):
     typ = typ or order.payment_type
     factory = payments.factory(typ)
     payment = factory.create_payment(
         currency=settings.SATCHLESS_DEFAULT_CURRENCY,
         total=order.get_total().gross)
     payment_variant = self.payment_class.objects.create(payment=payment,
                                                         order=order)
     return payment_variant