I am not a developer but have been asked to integrate Paymate ‘pay now’ buttons into a website.
Paymate has an ajax form to generate the code which is in the form:
<a onclick="self.name = 'parent';" target="_blank"
href="https://www.paymate.com/PayMate/ExpressPayment?mid=<username>&amt=<amount>&ref=<reference>">
<img src="https://www.paymate.com/images/ebay/paymate_accepted_logo_88x31.gif"
border="0" alt="Pay with Paymate Express">
</a>
username, amount & reference are all variables input into Paymate’s link generating form to generate a live link to paste into the source code.
My problem is that there are two items to be sold that come in variable multiple quantities.
I need to produce a form field which accepts a number, and on entering this number, the URL of the Paymate button needs to be altered dynamically, so that amt is the correct figure. e.g. 25 items @ 3.50 each.
I don’t know how to go about this.
Looks like a very good cause. I’ve produced something using jQuery which hopefully you could adapt to your purposes.
Update: using text field instead of select drop down. I’ve added a little bit of validation so that it checks if the value supplied is actually numeric.