When processing a credit card through paypal ec (sandbox) without a paypal account:
Notice: Undefined index: transaction_id in commerce_paypal_ec_response_to_ipn() (line 466 of /var/www/drupal-7/sites/all/modules/commerce_paypal_ec/commerce_paypal_ec.module).
Notice: Undefined variable: transactions in commerce_paypal_ec_paypal_ipn_process() (line 551 of /var/www/drupal-7/sites/all/modules/commerce_paypal_ec/commerce_paypal_ec.module).
Despite the notices, the following was also logged IPN processed for Order 6 with ID 3S862277AN619383D.
When paying with a paypal account (sandbox):
Notice: Undefined index: PAYMENTINFO_0_RECEIPTID in commerce_paypal_ec_response_to_ipn() (line 461 of /var/www/drupal-7/sites/all/modules/commerce_paypal_ec/commerce_paypal_ec.module).
Notice: Undefined index: transaction_id in commerce_paypal_ec_response_to_ipn() (line 466 of /var/www/drupal-7/sites/all/modules/commerce_paypal_ec/commerce_paypal_ec.module).
Notice: Undefined variable: transactions in commerce_paypal_ec_paypal_ipn_process() (line 551 of /var/www/drupal-7/sites/all/modules/commerce_paypal_ec/commerce_paypal_ec.module).
Similar log enty showing the IPN processed: IPN processed for Order 5 with ID 75979379L13116211.
Both order record that the payment completed.
Comment | File | Size | Author |
---|---|---|---|
#2 | commerce_paypal_ec-undefined_transactions-1666652-2.patch | 522 bytes | markisatacomputer |
Comments
Comment #1
citlacom CreditAttribution: citlacom commentedThis should be resolved in the commit http://drupalcode.org/project/commerce_paypal_ec.git/commit/e3dd90e
I added more strong validation for the response to ensure it has the keys:
That are essential to store and trace the payment notification. Please confirm if the warnings are gone.
Comment #2
markisatacomputer CreditAttribution: markisatacomputer commentedI was having a similar problem and realized that it was because the status of my payments has been pending rather than completed or voided. Here's the error message I was getting:
Notice: Undefined variable: transactions in commerce_paypal_ec_paypal_ipn_process() (line 677 of /var/www/dev/sites/all/modules/commerce_paypal_ec/commerce_paypal_ec.module).
And here's where the problem seemed to be in commerce_paypal_ec_paypal_ipn_process starting on line 673:
My solution was simple. Just make sure $transactions isset directly underneath rather than just if ($transactions)
Worked for me. Attaching a patch but I think it may be a little off due to the fact that I am using 7.x-1.0-alpha3+6-dev and I already patched this file. Hope it's helpful!
Comment #3
citlacom CreditAttribution: citlacom commentedThanks @markisatacomputer I applied your patch.