The ZIP code is an optional field. When saving a payment method, this
generates a traceback since `partner.zip` is `False` while the field
expects a `string`.
opw-1829829
- This commit fixes crashes occuring when the expiry date for a credit card was invalid.
Instead of crashing we now warn the customer that the expiry date is invalid.
It seems that Authorize.net returns an 'Error' status when transactions
fail (note that it can also return an Ok status for different types of
failures).
This is incoherent with the way the authorize requests are processed,
since an Error resultCode will raise a ValidationError, rollbacking the
complete cursor transaction. This makes little sense, since there should
be a trace of the payment.transaction in the backend (preferably with an
explanation for the failure).
This fix adds an error processing step to the response handling of
authorize.net - while before, it was assumed that an 'error' result
meant an issue in communication/setup, now it is treated as an error
in payment and the payment.transaction status is set accordingly.
I've added a test for this and it was green (pinky promise), but this
particular test suite is deactivated (or perhaps only on nightly, I need
to check the nightly process with @nim-odoo).
This reverts commit fb093726d7.
In my hurry, I forgot part of this debug feature, which made it crash
because I tried to stringify a element instead of a tree
The field `acquirer_reference` is not a mandatory field. If not
retrieved from the provider, it will have a NULL value in the DB, and
therefore will be `False` in Python.
The `capture` and `void` method will crash in this case, because of:
`etree.SubElement(tx, "refTransId").text = transaction_id`
opw-751231
The callback_eval field has a groups parameter of
base.group_system. Without this patch everyone not part of that group
ends up with an access right error when the system attempts to read
that field.
Previously this was not a problem because all code reading
callback_eval was executed with the superuser already. New code has
been introduced however that does not do this (eg. paying with a
payment.token from the backend).
opw-741181
When no email is defiend on the partner, a traceback is raised when
paying with Authorize.net.
The `text` attribute requires a string, not a boolean (`False` in this
case).
opw-728301
The `reference` field is used as `invoiceNumber` in the Authorize.net
API. However, this field is limited to 20 characters. Larger references
will produce an error when the API is called.
Source: https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd
opw-704615
- Create a SO, link it to a Quotation Template (e.g. "Odoo Monthly" from
the demo data). Note that the Quotation Template must require a
payment.
- Click on "Preview", then "Accept & Pay" in the website quote
- Pay with Authorize.net
- In the Subscription linked to the SO, change the invoice date to a
date in the past (so it will generate an invoice)
- Execute manually the Scheduled Action "Generate Recurring Invoices and
Payments for Subscription Contracts"
The payment is correctly registered on Authorize (you should receive a
confirmation email), but:
- No invoice is generated
- The next invoice date has not been changed
The issue comes from the fact that:
- `payment_authorize` executes the callback method
`reconcile_pending_transaction` before changing the status of the
transaction.
- The method `reconcile_pending_transaction` cancels and unlinks the
invoice if the transaction is not 'done' or 'authorized'.
In order to solve the issue, two fixes are necessary:
- Switch the status update with the callback (this commit), as it is
already the case for Ogone and Stripe.
- Do not manually call `reconcile_pending_transaction`, since it is
already executed as callback. This avoids two increments of the period
(commit in Enterprise).
opw-694730
This commit improves the tokenization process, allowing users
to set the acquirer to save payment data never, always or letting
the customer decide (only implemented in ecommerce for now).
Support for tokenization is improved for Ogone and Authorize.net
This commits also factorizes advanced payment features support
(authorization, tokenization, fees computation) in a generic method
overriden by every provider to specifiy which features are supported.
This process can be used in views to hide/show fields depending on
feature support or in constraint checks.
This commit add s2s communication to the Authorize.net payment
provider, allowing the user to:
- Create a payment token
- Charge a payment token
- Authorize/capture transactions
-*- coding: utf-'8' "-*-"
is not a valid encoding. Introduced by
666387a274 I think. It was probably a
typo/replace gone bad and it got copy-pasted everywhere. Emacs complains
every time you try to save changes to files with this invalid encoding.
This changes all of them to
coding: utf-8
adhering to eae045949d.
Done with:
find . -name '*.py' -print0 |\
xargs -0 sed -ie 's/-\*- coding: utf-'"'"'8'"'"' "-\*-"/coding: utf-8/'
merge *ALL* the dicts
The form rendering used to receive a dict for partner information and a dict for tx information and to transmit another dict to the qweb template; now everything is done in a single dict