Skip to content
Snippets Groups Projects
Commit 53f86de7 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] payment_authorize: use state code instead of state name

The state given to authorize requests should be the state code and not
the state name.

source:
https://support.authorize.net/authkb/index?page=content&id=A1454&actp=RSS

opw-675634
parent b0f02e31
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@ class PaymentAcquirerAuthorize(models.Model):
'first_name': values.get('partner_first_name'),
'last_name': values.get('partner_last_name'),
'phone': values.get('partner_phone'),
'state': values.get('partner_state') and values['partner_state'].name or '',
'state': values.get('partner_state') and values['partner_state'].code or '',
'billing_address': values.get('billing_partner_address'),
'billing_city': values.get('billing_partner_city'),
'billing_country': values.get('billing_partner_country') and values.get('billing_partner_country').name or '',
......@@ -78,7 +78,7 @@ class PaymentAcquirerAuthorize(models.Model):
'billing_first_name': values.get('billing_partner_first_name'),
'billing_last_name': values.get('billing_partner_last_name'),
'billing_phone': values.get('billing_partner_phone'),
'billing_state': values.get('billing_partner_state') and values['billing_partner_state'].name or '',
'billing_state': values.get('billing_partner_state') and values['billing_partner_state'].code or '',
}
temp_authorize_tx_values['returndata'] = authorize_tx_values.pop('return_url', '')
temp_authorize_tx_values['x_fp_hash'] = self._authorize_generate_hashing(temp_authorize_tx_values)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment