def _record_payment(self, request, order, method_key, amount, reference, **kwargs): """Payment Step 1""" fields = [ { "key": "amount", "value": amount, }, { "key": "reference_number", "value": order.number, }, { "key": "transaction_id", "value": Signer().sign(method_key), }, ] # Return a response showing we need to post some fields to the given # URL to finishing processing this payment method return FormPostRequired( amount=amount, name="get-token", url=reverse("creditcards-get-token"), fields=fields, )
def require_authorization_post(self, order, amount): fields = [{ 'key': 'amount', 'value': amount, }, { 'key': 'reference_number', 'value': order.number, }] return FormPostRequired(amount=amount, name='authorize', url=reverse('creditcards-authorize'), fields=fields)
def _record_payment(self, request, order, amount, reference, **kwargs): source = self.get_source(order, reference) amount_to_allocate = amount - source.amount_allocated fields = [{ 'key': 'amount', 'value': amount_to_allocate }, { 'key': 'reference_number', 'value': order.number }] # Return a response showing we need to post some fields to the given # URL to finishing processing this payment method return FormPostRequired(amount=amount, name='get-token', url=reverse('creditcards-get-token'), fields=fields)
def require_authorization_post(self, order, method_key, amount): """Payment Step 2""" fields = [ { 'key': 'amount', 'value': amount, }, { 'key': 'reference_number', 'value': order.number, }, { 'key': 'transaction_id', 'value': Signer().sign(method_key), }, ] return FormPostRequired(amount=amount, name='authorize', url=reverse('creditcards-authorize'), fields=fields)
def require_authorization_post(self, order, method_key, amount): """Payment Step 2""" fields = [ { "key": "amount", "value": amount, }, { "key": "reference_number", "value": order.number, }, { "key": "transaction_id", "value": Signer().sign(method_key), }, ] return FormPostRequired( amount=amount, name="authorize", url=reverse("creditcards-authorize"), fields=fields, )
def _record_payment(self, request, order, method_key, amount, reference, **kwargs): """Payment Step 1""" fields = [ { 'key': 'amount', 'value': amount, }, { 'key': 'reference_number', 'value': order.number, }, { 'key': 'transaction_id', 'value': Signer().sign(method_key), }, ] # Return a response showing we need to post some fields to the given # URL to finishing processing this payment method return FormPostRequired(amount=amount, name='get-token', url=reverse('creditcards-get-token'), fields=fields)