I'm trying to integrate CyberSource's REST API into a Django (Python) application. I'm following this GitHub example /echatrandom example. It works like a charm but it is not clear to me from the example or from the documentation /echatspin how to specify the device's fingerprint ID.
Here's a snippet of the request I'm sending in case it comes useful (note: this is just a method that lives inside a POPO):
def authorize_payment(self, card_token: str, total_amount: Money, customer: CustomerInformation = None, merchant: MerchantInformation = None): try: request = { 'payment_information': { # NOTE: REQUIRED. 'card': None, 'tokenized_card': None, 'customer': { 'customer_id': card_token, }, }, 'order_information': { 'amount_details': { 'total_amount': str(total_amount.amount), 'currency': str(total_amount.currency), }, }, } if customer: request['order_information'].update({ 'bill_to': { 'first_name': customer.first_name, 'last_name': customer.last_name, 'company': customer.company, 'address1': customer.address1, 'address2': customer.address2, 'locality': customer.locality, 'country': customer.country, 'email': customer.email, 'phone_number': customer.phone_number, 'administrative_area': customer.administrative_area, 'postalCode': customer.zip_code, } }) serialized_request = json.dumps(request) data, status, body = self._payment_api_client.create_payment(create_payment_request=serialized_request) return data.id except Exception as e: raise AuthorizePaymentError from e
10-19-2022 05:37 AM
I've been holding for a while, but the market's dynamism is making me feel pretty uneasy at 3d gaming logo. I could need some guidance.
10-27-2022 04:16 AM - last edited on 10-27-2022 07:53 AM by Kh-SabW
Hello,
I ended up sticking to Simple Order API + Checkout API for authorizations and tokenizations, respectively.
11-08-2022 02:18 AM