Closed (fixed)
Project:
Webform Pay
Version:
6.x-1.0-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2010 at 19:54 UTC
Updated:
24 Apr 2013 at 08:46 UTC
Jump to comment: Most recent file
Comments
Comment #1
sgabe commentedSee the attached patch.
Comment #2
quicksketchThis doesn't look like it would work. The #parents array determines where in $form_state['values'] the value should be set. With this patch, it doesn't look like any value would be sent to the payment gateway. I'm also not getting this error at all, so I'll need to try and figure out how this is happening in the first place. Perhaps there's a change in the newest version of Pay?
Comment #3
sgabe commentedYeah, I got you. I am not sure either, but I tried to set properly the #parents and I couldn't figure out the right setting. Either the amount validation didn't work or the payment method wasn't executed.
With the empty array() it looks fine. I got the error if the amount is not good and the payment method is executed too. However I am sure that the #parents needs to be set for form_set_value().
I see this is inherited from Pay, I guess I should have ask there first. Feel free to move the issue if you want.
Comment #4
quicksketchThe central issue with this request is that you're using the "Custom payment" gateway which I hadn't extensively tested in any way (I was just testing Credit Card processing). Upon trying out a custom payment I found that there isn't a form element at all for custom payments, so there isn't any need to set a "total" for that form element. When using CC payments, the form element is used to send the value to CC processing gateway. The form-level total is used to store in the Pay module transaction history.
This patch makes several changes that make Webform Pay work better with custom payments, including properly displaying both CC and non-CC submissions, and conditionally setting the total value based on the payment mechanism used. I've committed to CVS. Thanks for your patches sgabe. :)
Comment #5
quicksketchComment #7
renesmee commentedcan anyone tell how to use 'webform pay'? i added the module but payment methods are missing.