Add payment provider specific details to the API

This commit is contained in:
Raphael Michel
2019-08-30 17:04:22 +02:00
parent e3a4ec93fc
commit aa99dbc830
9 changed files with 81 additions and 13 deletions

View File

@@ -411,6 +411,12 @@ class StripeMethod(BasePaymentProvider):
}
return template.render(ctx)
def api_payment_details(self, payment: OrderPayment):
return {
"id": payment.info_data.get("id", None),
"payment_method": payment.info_data.get("payment_method", None)
}
def payment_control_render(self, request, payment) -> str:
if payment.info:
payment_info = json.loads(payment.info)