Closed (fixed)
Project:
Webform Pay
Version:
6.x-1.0-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 Nov 2010 at 09:59 UTC
Updated:
10 Jan 2011 at 20:20 UTC
Jump to comment: Most recent file
I have been developing a direct payment method where payments are collected on third-party sites, hence I don't need to set the payment types for the form, the user doesn't need to give the credit card details at all.
According to the current behaviour _webform_submit_pay() tries to mask the credit card number even when it wasn't given by the user. This is causing theme_webform_display_pay() to fail, because the cc_number is set to **** **** ****, but I didn't implemented payment_types() because - like I said - it is a direct method.
function theme_webform_display_pay($element) {
if ($element['#value']['cc_number']) {
$value = $element['#value'];
$pay_method = pay_method_load($element['#pmid']);
$payment_types = $pay_method->payment_types();
...
We should check on submit if the credit card type and number is set, before doing anything with it.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | webform_pay.977302_01.patch | 1.2 KB | sgabe |
Comments
Comment #1
sgabe commentedPatch attached.
Comment #2
quicksketchThanks, so far I haven't used Webform Pay with anything but credit cards. This looks good to me and I'll include it next time I'm working on Webform Pay.
Comment #3
quicksketchCommitted, thanks!