[FIX] payment_paypal: paypal IPN, receiver_id is not always passed

The method  _paypal_form_get_invalid_parameters checks that the params passed by the paypal feedback coroborate with the transaction requested by Odoo.

It looks like the 'receiver_id' is not always passed by the paypal feedback. Therefore, we check this param only if it is available in the paypal feeback.

This issue had as side-effect to not validate the paypal transaction, which remained 'draft' permanently.
This commit is contained in:
Denis Ledoux 2014-08-04 10:25:59 +02:00
parent b6acdc4a74
commit 98e9981d59
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ class TxPaypal(osv.Model):
# check seller
if data.get('receiver_email') != tx.acquirer_id.paypal_email_account:
invalid_parameters.append(('receiver_email', data.get('receiver_email'), tx.acquirer_id.paypal_email_account))
if tx.acquirer_id.paypal_seller_account and data.get('receiver_id') != tx.acquirer_id.paypal_seller_account:
if data.get('receiver_id') and tx.acquirer_id.paypal_seller_account and data['receiver_id'] != tx.acquirer_id.paypal_seller_account:
invalid_parameters.append(('receiver_id', data.get('receiver_id'), tx.acquirer_id.paypal_seller_account))
return invalid_parameters