Setting value in variable provided while creating paypal buy button -


i have paypal buttom generated buy.the scripts contains variable values provided want provide value variables dynamically.

this buy button generated.

    <script data-callback="http://sajilobazar.com"  data-tax="3" data-shipping="1"  data-currency="usd"  data-amount="45"  data-quantity="1"  data-name="helo"  data-button="buynow" src="https://www.paypalobjects.com/js/external/paypal-button.min.js?merchant=*****@yahoo.com" async="async"> </script> 

as seen in above code variables data-tax pre populated.i want provide own value.

this tried

var x= "3"; data-tax=x 

but won't work.please help!!!

you can use data-tax-editable makes tax editable , enter value pass dynamic tax variable.

eg:

<script data-callback="http://sajilobazar.com"  data-tax-editable="3" data-shipping="1"  data-currency="usd"  data-amount="45"  data-quantity="1"  data-name="helo"  data-button="buynow" src="https://www.paypalobjects.com/js/external/paypal-button.min.js?merchant=*****@yahoo.com" async="async"> </script> 

but, alternatively use button manager api create dynamic buttons via bmcreatebutton api call.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -