[IMP][H4547] website_sale_signifyd: API v3 (WIP)

This commit is contained in:
Milan Cosnefroy
2024-10-09 13:48:06 +02:00
parent 7701c61bf0
commit 84c4774b35

View File

@@ -143,7 +143,32 @@ class SaleOrder(models.Model):
} for carrier in self.carrier_id
],
'coverageRequests': coverage_codes,
},
'transactions': [
{
"parentTransactionId": None,
"transactionId": tx.id,
"gateway": tx.acquirer_id.name,
"paymentMethod": "CREDIT_CARD",
"gatewayStatusCode": tx_status_type.get(tx.state, 'PENDING'),
"currency": tx.currency_id.name,
"amount": tx.amount,
# "avsResponseCode": "Y",
# "cvvResponseCode": "N",
"checkoutPaymentDetails": {
"accountHolderName": tx.partner_id.name,
"billingAddress": {
"streetAddress": tx.partner_id.street,
"unit": tx.partner_id.street2,
"city": tx.partner_id.city,
"provinceCode": tx.partner_id.state_id.code,
"postalCode": tx.partner_id.zip,
"countryCode": tx.partner_id.country_id.code,
}
}
}
for tx in self.transaction_ids
],
}
for line in new_case_vals['purchase']['products']: