Hi ,
I got failed paypal payment confirmation ,failed sometime , on odoo 12.
When client finished payment processing, he got notice “ Error,Please be aware that an error occurred during the transaction.The order has been confirmed but will not be paid..."
In server log ,i got this:
2019-10-08 12:44:22,941 3523 ERROR servername odoo.addons.payment_paypal.controllers.main: Unable to validate the Paypal payment
Traceback (most recent call last):
File "/home/ubuntu/odoo/addons/payment_paypal/controllers/main.py", line 104, in paypal_dpn
res = self.paypal_validate_data(**post)
File "/home/ubuntu/odoo/addons/payment_paypal/controllers/main.py", line 78, in paypal_validate_data
res = request.env['payment.transaction'].sudo().form_feedback(post, 'paypal')
File "/home/ubuntu/odoo/addons/payment/models/payment_acquirer.py", line 952, in form_feedback
return getattr(tx, feedback_method_name)(data)
File "/home/ubuntu/odoo/addons/payment_paypal/models/payment.py", line 212, in _paypal_form_validate
self._set_transaction_done()
File "/home/ubuntu/odoo/addons/payment/models/payment_acquirer.py", line 726, in _set_transaction_done
raise ValidationError(_('Only draft/authorized transaction can be posted.'))
odoo.exceptions.ValidationError: ('Only draft/authorized transaction can be posted.', None)
And this order will remain as "quotation" status in backend Sales, not "order" status.
This problem didn't happen for all PayPal payments, only few of them effected.
Looks like odoo already received payment form from Paypal and changed payment.transaction status ,but somehow it processed a duplicated validation, and during this validation payment.transaction status is not draft any more.
it caused by unstable network? logic bug ?
I found my problem maybe same like this post,
https://github.com/odoo/documentation-user/commit/d43b0b42d1371bc4587d1a323304fda79accaa8f
And i just checked on paypal, seems they have changed the page for "profile and settings", and "paypal button language encoding" is not there any more, neither the "more selling tools " menu.
"Button language encoding" was utf-8 and " Block Non-encrypted Website Payment" was off and by that time i don't have problem with paypal pament.
My website has few orders, i will try to get more details.
recent 2 fail cases all paid from mobile client, language is Russian and Slovak