Reply To: Issue with Deposit Function for custom gateway

Hi,

Your forum trimmed all of the HTML out of the code. To be clear, the form itself and going to the gateway both work completely fine.

The problem is that $price, passed to the function, is always the full value and not the deposit. How would I go about determining whether it is a deposit payment and therefore changing the amount sent off to the gateway?

Thanks,

We have made some progress – it looks like the hidden field sagepay_amount is the one that defines the final price. When the user changes their amount on the final checkout page, it uses JavaScript to change the value of this before they are sent off to the gateway. At least, that’s how I think its meant to work.

Unfortunately, the price (sagepay_amount) as a hidden field is not being changed – it just stays put at an arbitrary full value. We’re now testing to see whether it only doesn’t change in element inspector, and does pass the correct value when submitted.

Would appreciate any thoughts!

George

Final update: the ‘amount_name’ field controller (on ours set to ‘sagepay_amount’, but can be anything) isn’t updating for a deposit. I can see JavaScript that should make it work, but it doesn’t function. This renders the deposits function more or less non-functional. I would appreciate your assistance in fixing this problem (we’ve tried several permeations of code and are sure it isn’t a problem with our gateway).

Thanks,

George