How to set price for paypal dynamically?
I have a landing page for proofreading services website. I have a form, where the user inputs the number of words he wishes to proofread. I have a price of 10$ per 1000 words. So I can’t just create a button using paypal builder they provide, I need to do some coding, sigh.
Now, this the custom HTML code I have added on the page and which creates paypal buy now button, where XXX is paypal email:
And I know that this javascript can somehow be altered, so that it will help me achieve what I need, but I’m not really sure how to stick all these pieces together.
Instead of ‘29.00’ I should be obviously passing the amount of words, that the user inputs in the form, multiplied by 0.01. I just don’t know how to do that.
I also tried to do this completely differently, by passing the values using the form confirmation button and then in “Form Confirmation” --> Go to another webpage --> and the URL was https://www.paypal.com/cgi-bin/webscr…=???
The tricky part, again, is where I’ve put ‘???’.
I’m feeling like I’m slowly going mad. Please help 🙂