Skip to content

Instantly share code, notes, and snippets.

@winzard
Created May 18, 2017 15:14
Show Gist options
  • Select an option

  • Save winzard/c78db2f8a7b584741b22bc8825ca7eae to your computer and use it in GitHub Desktop.

Select an option

Save winzard/c78db2f8a7b584741b22bc8825ca7eae to your computer and use it in GitHub Desktop.
reference = cash_gateway.create_transaction(order_number, total)
source_type, is_created = SourceType.objects.get_or_create(name=u'Оплата наличными')
source = Source(
source_type=source_type,
currency=total.currency,
amount_allocated=total.incl_tax,
amount_debited=0
)
self.add_payment_source(source)
self.add_payment_event(u'Запрос', total.incl_tax, reference=reference)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment