How to dynamically change the data in the loaded script?

Hello! There is a script from payment integrator "paymaster" which loads the payment form:
<script id="paymaster" type="text/javascript" src="https://paymaster.ru/ru-RU/widget/Basic/1?LMI_MERCHANT_ID=1111&LMI_PAYMENT_AMOUNT=100&"></script>


Also, depending on the changing amount of the payment (LMI_PAYMENT_AMOUNT)
<form>
 <select name="mesto">
<option value="Winner (1st place)">1</option>
<option value="Winner (2nd place)">2</option>
<option value="Winner (3rd place)">3</option>
<option value="Party">Party</option>
</select>
<input type="submit" value="Pay">
</form>


But since a paymaster script, then actually it is loaded when the page loads and change the value somehow dynamically impossible.

Had the idea to load the script after clicking submit. Just don't understand how to implement it. Could you tell me please!

Conditional:
if submit is pressed {
load script paymaster
}
June 3rd 19 at 21:00
0 answer

Find more questions by tags JavaScriptHTMLPayment systems