diff options
| author | Gert Pellin <switch87@users.noreply.github.com> | 2018-08-31 11:29:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-31 11:29:38 +0200 |
| commit | 26974d4e5fe48d34294434ed52dcf8053416410e (patch) | |
| tree | 01d5e93474fd184c9c41459e1868b61ffe14af47 /addons/payment_authorize/models | |
| parent | 4877030d64b22e045dcaf02be531a5f69123b389 (diff) | |
[FIX] payment_authorize: add required fields for wespac Australia (#26709)
for the payment processor wespac there are required fields we do not send.
required:
•Card Number
•Expiration Date
•Amount
•First Name
•Last Name
•Address
•City
•State/Province**
•Zip Code (Postal Code/Postcode)**
•Country
•Email
** These fields are optional if the billing address is not in the U.S. or Canada. If the address is in the U.S. or Canada, the two-digit State/Province code must be provided, along with the Zip/Postal Code.
Diffstat (limited to 'addons/payment_authorize/models')
| -rw-r--r-- | addons/payment_authorize/models/authorize_request.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py index ae012237341..571f86d4f68 100644 --- a/addons/payment_authorize/models/authorize_request.py +++ b/addons/payment_authorize/models/authorize_request.py @@ -138,6 +138,8 @@ class AuthorizeAPI(): payment_profile = etree.SubElement(profile, "paymentProfiles") etree.SubElement(payment_profile, "customerType").text = 'business' if partner.is_company else 'individual' billTo = etree.SubElement(payment_profile, "billTo") + etree.SubElement(billTo, "firstName").text = (partner.name.split(' ')[0] or None) + etree.SubElement(billTo, "lastName").text = (' '.join(partner.name.split(' ')[1:]) or None) etree.SubElement(billTo, "address").text = (partner.street or '' + (partner.street2 if partner.street2 else '')) or None missing_fields = [partner._fields[field].string for field in ['city', 'country_id'] if not partner[field]] |
