Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Payment
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2012 at 18:28 UTC
Updated:
17 Dec 2012 at 08:30 UTC
Jump to comment: Most recent file
If for some reason the default credit card gateway is disabled, there is a form at /admin/store/orders/%/payments/select/credit to display the available gateways and let the admin choose one to make a payment. I suspect this has never even been used, as the default gateway will be set and never changed on 99.9% of all sites, so this should just be removed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1855986-remove-payment-gateway-select.patch | 4.25 KB | longwave |
Comments
Comment #1
longwaveComment #2
longwaveAfter this patch is applied, I think we can simplify uc_payment_process_payment() further - at least the last parameter can be removed, which is TRUE to redirect after the payment is made - but this is never used in core, and should be the caller's responsibility anyway.
Comment #3
DanZ commentedWhen does this doomed form show up?
Comment #4
longwave1. Enable at least three credit card payment gateways (Test Gateway, PayPal WPP, Authorize.Net, etc.)
2. Go to /admin/store/settings/payment/method/credit and select e.g. PayPal WPP as the default gateway
3. Disable the PayPal module, or whatever you selected in step 2
4. Find an order and edit the payment method to Credit card
5. View the order and click Process card
6. Enter some credit card details to attempt to charge the card
7. The payment gateway select page will be shown
This only ever shows up if you have selected a default gateway, then disabled the module that provides that gateway, still have at least two other gateways enabled, and then attempt to charge the card as an administrator. As this is such an unlikely set of circumstances I suspect this code has never been used, and I don't even think it works in 7.x at least as if I try this and attempt to charge Test Gateway I get a bunch of errors and "Credit card charge failed".
Comment #5
longwaveAfter applying the patch, instead you get "An error has occurred with your payment gateway. The charge function could not be found." which is a bit more sensible.
Comment #6
longwaveCommitted. I don't see the point in keeping this around when it doesn't work.