diff options
| author | Jorge Pinna Puissant <jpp@odoo.com> | 2019-02-01 13:15:04 +0000 |
|---|---|---|
| committer | Jorge Pinna Puissant <jpp@odoo.com> | 2019-02-07 07:40:40 +0000 |
| commit | 37220d02a4d86e0f9a1d4658770a2d673605de13 (patch) | |
| tree | 9f27163ba341df2edf1af74be0e4e0d8b254734c /addons/payment_authorize/controllers | |
| parent | 2a881865e88ad3c1f7ca52f0ec4e61b8745c3eec (diff) | |
[FIX] payment_authorize: add new card verification
In the e-comerce, when the user try to add a new card in this payment
methods.
Before this commit, to validate the card, besides of the creation of the
payment token, an amount of $1.5 id charged and refunded.
During the refunded an error was raised. This error arrives because:
payments made via Authorize.net are settled and allowed to be refunded
only on the next day.
https://account.authorize.net/help/Miscellaneous/FAQ/Frequently_Asked_Questions.htm#Refund
<quote>The original transaction that you wish to refund must have a status of Settled Successfully.
You cannot issue refunds against unsettled, voided, declined or errored transactions.</quote>
This means, we can't refund directly after the payment.
Now, we only create the payment token. As Authorize.net verify the card
during the creation of the token, a new verification is not needed.
OPW-1927754
closes odoo/odoo#30905
Diffstat (limited to 'addons/payment_authorize/controllers')
| -rw-r--r-- | addons/payment_authorize/controllers/main.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/addons/payment_authorize/controllers/main.py b/addons/payment_authorize/controllers/main.py index 9614327401a..a5f55f07afe 100644 --- a/addons/payment_authorize/controllers/main.py +++ b/addons/payment_authorize/controllers/main.py @@ -77,13 +77,14 @@ class AuthorizeController(http.Controller): 'id': token.id, 'short_name': token.short_name, '3d_secure': False, - 'verified': False, + 'verified': True, #Authorize.net does a transaction type of Authorization Only + #As Authorize.net already verify this card, we do not verify this card again. } - - if verify_validity != False: - token.validate() - res['verified'] = token.verified - + #token.validate() don't work with Authorize.net. + #Payments made via Authorize.net are settled and allowed to be refunded only on the next day. + #https://account.authorize.net/help/Miscellaneous/FAQ/Frequently_Asked_Questions.htm#Refund + #<quote>The original transaction that you wish to refund must have a status of Settled Successfully. + #You cannot issue refunds against unsettled, voided, declined or errored transactions.</quote> return res @http.route(['/payment/authorize/s2s/create'], type='http', auth='public') |
