When I was testing this module against my checkout form, I got these two notices:
Notice: Undefined index: sescrd in uc_credit_cart_review_pre_form_submit()
Notice: Undefined index: cc_cvv in test_gateway_charge()
Turns out, uc_credit module's uc_credit_cart_review_pre_form_submit() expects $_POST['sescrd'] to be populated with base64_encode($_SESSION['sescrd']). When this data is missing, the payment details array on the order object are incomplete. It specifically expects this to be in $_POST rather than somewhere in $form_state.
Since I'm using the test gateway in my store, I can't speak to whether this breaks credit card processing with a live gateway, so I'm only assuming that this would apply to all gateways.
I've attached a patch that should address this. Please let me know if I've traced through this wrong, or made a wrong assumption anywhere. Hope this helps!
| Comment | File | Size | Author |
|---|---|---|---|
| uc_optional_checkout_review-missing_sescrd.patch | 696 bytes | benclark |
Comments
Comment #1
Anonymous (not verified) commentedThank you for posting this, the patch resolved one of the errors I had on a Drupal 7 build.
Comment #2
squarecandy commentedThanks - works for me too.
Comment #3
nbchip commentedStill getting error after applying patch
PHP Version 5.2.9
Notice: Undefined index: sescrd in uc_credit_cart_review_pre_form_submit() (line 758 of C:\xampp\htdocs\x\sites\all\modules\ubercart-7.x-3.1\ubercart\payment\uc_credit\uc_credit.module).Comment #4
bgm commentedThanks, patch committed to 7.x-1.x (will be in 7.x-1.1, use -dev versions until then).
Comment #6
Collins405 commentedI have just received this again using Paypal WPS.
After enabling the module, and the latest dev version, the order automatically goes through and send emails, but no payment happens, and I get...
Notice: Undefined index: sescrd in uc_credit_cart_review_pre_form_submit() (line 770 of /public_html/sites/all/modules/contrib/ubercart/payment/uc_credit/uc_credit.module).
Comment #7
Collins405 commentedI downloaded the tar.gz file here and can confirm it fixes the problem