Developers / Pay Buttons / Dynamic Buttons HTML Sample Code
Dynamic buttons HTML Sample Code

Dynamic "Pay Now" Buttons HTML Sample Code



Let`s say "Test Ltd." which has email address order@test.com creates a button for product "Test Product" (that has internal ID in their store 123456) that costs 150.00 USD. They also want to ask the user for their shipping address to know where the "Test Product" will be sent. They want the user to go to https://www.test.com/cancel/ if the user cancels the payment and to https://www.test.com/finish/ if the user completed the payment successfully. Also they want to be notified right after the payment was completed to https://www.test.com/ipn/ to inform their shipping department.

<form action="https://www.paxum.com/payment/phrame.php?action=displayProcessPaymentLogin" method="post">

<input type="hidden" name="business_email" value="order@test.com" />
<input type="hidden" name="button_type_id" value="1" />
<input type="hidden" name="item_id" value="123456" />
<input type="hidden" name="item_name" value="Test Product" />
<input type="hidden" name="amount" value="150.00" />
<input type="hidden" name="currency" value="USD" />
<input type="hidden" name="ask_shipping" value="1" />
<input type="hidden" name="cancel_url" value="https://www.test.com/cancel/ " />
<input type="hidden" name="finish_url" value="https://www.test.com/finish/" />
<input type="hidden" name="variables" value="notify_url=https://www.test.com/ipn/ " />

<input type="image" border="0" name="submit" title="Safe and easy way to pay" src="../payment/images/payment/button_paynow_en.gif" />

</form>

Dynamic "Subscription" Buttons HTML Sample Code



Let`s say "Test Ltd." which has email address order@test.com creates a button for their clients to subscribe to "Test Products Magazine". The magazine is issued every month and the subscription fee is 10.00 USD / month. The subscription should be active until the user cancels it. They also want to ask the user for their shipping address to know where the "Test Product Magazine" will be sent. They want the user to go to https://www.test.com/cancel/ if the user cancels the payment and to https://www.test.com/finish/ if the user completed the payment successfully. Also they want to be notified right after the payment was completed to https://www.test.com/ipn/ to inform their shipping department.

<form action="https://www.paxum.com/payment/phrame.php?action=displayProcessPaymentLogin" method="post">

<input type="hidden" name="business_email" value="order@test.com" />
<input type="hidden" name="button_type_id" value="2" />
<input type="hidden" name="item_name" value="Test Products Magazine" />
<input type="hidden" name="amount" value="10.00" />
<input type="hidden" name="currency" value="USD" />
<input type="hidden" name="ask_shipping" value="1" />
<input type="hidden" name="payment_interval" value="3" />
<input type="hidden" name="user_cancel" value="1" />
<input type="hidden" name="cancel_url" value="https://www.test.com/cancel/ " />
<input type="hidden" name="finish_url" value="https://www.test.com/finish/" />
<input type="hidden" name="variables" value="notify_url=https://www.test.com/ipn/ " />

<input type="image" border="0" name="submit" title="Safe and easy way to pay" src="../payment/images/payment/button_subscribe_en.gif" />
</form>

Custom Fields - Dynamic "Pay Now" Buttons HTML Sample Code


email
domain

Let`s say "Test Ltd." which has email address order@test.com creates a button for product "Test Product" (that has internal ID in their store 123456) that costs 150.00 USD. They also want to ask the user for their shipping address to know where the "Test Product" will be sent. They want the user to go to https://www.test.com/cancel/ if the user cancels the payment and to https://www.test.com/finish/ if the user completed the payment successfully. Also they want to be notified right after the payment was completed to https://www.test.com/ipn/ to inform their shipping department. "Test Product" can be customized by engraving a text to it.

<form action="https://www.paxum.com/payment/phrame.php?action=displayProcessPaymentLogin" method="post">

<input type="hidden" name="business_email" value="order@test.com" />
<input type="hidden" name="button_type_id" value="1" />
<input type="hidden" name="item_id" value="123456" />
<input type="hidden" name="item_name" value="Test Product" />
<input type="hidden" name="amount" value="150.00" />
<input type="hidden" name="currency" value="USD" />
<input type="hidden" name="ask_shipping" value="1" />
<input type="hidden" name="cancel_url" value="https://www.test.com/cancel/ " />
<input type="hidden" name="finish_url" value="https://www.test.com/finish/" />
<input type="hidden" name="variables" value="notify_url=https://www.test.com/ipn/ " />

<table>
<tr><td><input type="hidden" name="cfl_1" value="email address"/>email</td></tr><tr><td><input type="text" name="cfv_1" maxlength="60" value="enter email here"/></td></tr>
<tr><td><input type="hidden" name="cfl_2" value="domain"/>domain</td></tr><tr><td><input type="text" name="cfv_2" maxlength="60" value="enter domain name here"/></td></tr>
</table>

<input type="image" border="0" name="submit" title="Safe and easy way to pay" src="../payment/images/payment/button_paynow_en.gif" />

</form>

Multiple Options - Dynamic "Pay Now" Buttons HTML Sample Code




Let`s say "Test Ltd." which has email address order@test.com creates a button for product "Test Product" (that has internal ID in their store 123456) that costs 10.00 USD, 15.00 USD or 30.00 USD depending which option is selected. They want the user to go to https://www.test.com/cancel/ if the user cancels the payment and to https://www.test.com/finish/ if the user completed the payment successfully. Also they want to be notified right after the payment was completed to https://www.test.com/ipn/ to inform their shipping department.

<form action="https://www.paxum.com/payment/phrame.php?action=displayProcessPaymentLogin" method="post">

<input type="hidden" name="business_email" value="order@test.com" />
<input type="hidden" name="button_type_id" value="1" />
<input type="hidden" name="item_id" value="123456" />
<input type="hidden" name="item_name" value="Test Product" />
<input type="hidden" name="currency" value="USD" />
<input type="hidden" name="cancel_url" value="https://www.test.com/cancel/ " />
<input type="hidden" name="finish_url" value="https://www.test.com/finish/" />
<input type="hidden" name="variables" value="notify_url=https://www.test.com/ipn/ " />

<select name="amount">
	<option value="10.00">Silver Hosting Plan - $10.00</option>
	<option value="15.00">Bronz Hosting Plan - $15.00</option>
	<option value="30.00">Gold Hosting Plan - $30.00</option>
</select>

<br/>

<input type="image" border="0" name="submit" title="Safe and easy way to pay" src="../payment/images/payment/button_paynow_en.gif" />

</form>