VAD Place payment gateway in integration in php
VAD Place API integration in php
how to integrate payment gateway in php | how to integrate payment gateway in website tutorial | payment gateway form php source code | debit card payment gateway integration in php | stripe | how to add payment gateway in html website | payment gateway in php and mysql | php code for online payment
how to integrate payment gateway in php | how to integrate payment gateway in website tutorial | payment gateway form php source code | debit card payment gateway integration in php | stripe | how to add payment gateway in html website | payment gateway in php and mysql | php code for online payment
how to integrate payment gateway in php | how to integrate payment gateway in website tutorial | payment gateway form php source code | debit card payment gateway integration in php | stripe | how to add payment gateway in html website | payment gateway in php and mysql | php code for online payment
how to integrate payment gateway in php | how to integrate payment gateway in website tutorial | payment gateway form php source code | debit card payment gateway integration in php | stripe | how to add payment gateway in html website | payment gateway in php and mysql | php code for online payment
how to integrate payment gateway in php | how to integrate payment gateway in website tutorial | payment gateway form php source code | debit card payment gateway integration in php | stripe | how to add payment gateway in html website | payment gateway in php and mysql | php code for online payment
how to integrate payment gateway in php | how to integrate payment gateway in website tutorial | payment gateway form php source code | debit card payment gateway integration in php | stripe | how to add payment gateway in html website | payment gateway in php and mysql | php code for online payment how to integrate payment gateway in php how to integrate payment gateway in website tutorial payment gateway form php source code debit card payment gateway integration in php stripe how to add payment gateway in html website payment gateway in php and mysql php code for online payment
Share
Try using the below code and please update merchant id
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Merchant Order Payment Form </title>
<link rel="stylesheet" href="d.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
var scriptUrl = "http://www.vad-place.com/api/load.js?merchant_id=xxx";
$(function() {
$('form').submit(function(event) {
$(this).hide();
res = {};
for (var field in paymentInfo.billing_address) {
res[field] = $('input#billing_' + field).val();
}
paymentInfo.billing_address = res;
res = {};
for (var field in paymentInfo.shipping_address) {
res[field] = $('input#shipping_' + field).val();
}
paymentInfo.shipping_address = res;
paymentInfo.product_id = $("#product_id").val();
paymentInfo.order_title = $("#order_title").val();
paymentInfo.payment_data = $("#payment_data").val();
console.log("step 1");
$.getScript(scriptUrl);
console.log("step 2");
return false;
});
});
</script>
<script type="text/javascript">
function SetBilling(checked) {
if (checked) {
document.getElementById('shipping_first_name').value = document.getElementById('billing_first_name').value;
document.getElementById('shipping_last_name').value = document.getElementById('billing_last_name').value;
document.getElementById('shipping_street1').value = document.getElementById('billing_street1').value;
document.getElementById('shipping_street2').value = document.getElementById('billing_street2').value;
document.getElementById('shipping_city').value = document.getElementById('billing_city').value;
document.getElementById('shipping_zip').value = document.getElementById('billing_zip').value;
document.getElementById('shipping_state').value = document.getElementById('billing_state').value;
document.getElementById('shipping_country').value = document.getElementById('billing_country').value;
document.getElementById('shipping_phone').value = document.getElementById('billing_phone').value;
document.getElementById('shipping_fax').value = document.getElementById('billing_fax').value;
document.getElementById('shipping_email').value = document.getElementById('billing_email').value;
} else {
document.getElementById('shipping_first_name').value = '';
document.getElementById('shipping_last_name').value = '';
document.getElementById('shipping_street1').value = '';
document.getElementById('shipping_street2').value = '';
document.getElementById('shipping_city').value = '';
document.getElementById('shipping_zip').value = '';
document.getElementById('shipping_state').value = '';
document.getElementById('shipping_country').value = '';
document.getElementById('shipping_phone').value = '';
document.getElementById('shipping_fax').value = '';
document.getElementById('shipping_email').value = '';
}
}
</script>
</head>
<body>
<div style="text-align: center;"><h1>Merchant Order Payment Form </h1></div>
<form>
<div style="padding-left:780px;"><input type="checkbox" onclick="SetBilling(this.checked);"/> Same as Billing Address</div>
<div style="float:left;padding-left:180px;">
<h2>Customer Billing Address</h2>
<table>
<tr>
<th><label for="billing_first_name">First Name:</label></th>
<td><input type="text" id="billing_first_name" placeholder="John" /></td>
</tr>
<tr>
<th><label for="billing_last_name">Last Name:</label></th>
<td><input type="text" id="billing_last_name" placeholder="Smith" /></td>
</tr>
<tr>
<th><label for="billing_street1">Street address 1:</label></th>
<td><input type="text" id="billing_street1" placeholder="41st Park Avenue" /></td>
</tr>
<tr>
<th><label for="billing_street2">Street address 2:</label></th>
<td><input type="text" id="billing_street2" placeholder="15th Floor" /></td>
</tr>
<tr>
<th><label for="billing_city">City:</label></th>
<td><input type="text" id="billing_city" placeholder="New York" /></td>
</tr>
<tr>
<th><label for="billing_zip">Zip:</label></th>
<td><input type="text" id="billing_zip" placeholder="10022" /></td>
</tr>
<tr>
<th><label for="billing_state">State:</label></th>
<td><input type="text" id="billing_state" placeholder="NY" /></td>
</tr>
<tr>
<th><label for="billing_country">Country:</label></th>
<td><input type="text" id="billing_country" placeholder="United States" /></td>
</tr>
<tr>
<th><label for="billing_phone">Phone:</label></th>
<td><input type="text" id="billing_phone" placeholder="+1 212 001 1234" /></td>
</tr>
<tr>
<th><label for="billing_fax">Fax:</label></th>
<td><input type="text" id="billing_fax" placeholder="+1 212 001 2345" /></td>
</tr>
<tr>
<th><label for="billing_email">E-mail:</label></th>
<td><input type="text" id="billing_email" placeholder="john.smith@gmail.com" /></td>
</tr>
</table>
</div>
<div style="float:right;padding-right:180px;">
<h2>Customer Shipping Address</h2>
<table>
<tr>
<th><label for="shipping_first_name">First Name:</label></th>
<td><input type="text" id="shipping_first_name" placeholder="John" /></td>
</tr>
<tr>
<th><label for="shipping_last_name">Last Name:</label></th>
<td><input type="text" id="shipping_last_name" placeholder="Smith" /></td>
</tr>
<tr>
<th><label for="shipping_street1">Street address 1:</label></th>
<td><input type="text" id="shipping_street1" placeholder="14th Avenue of the Americas" /></td>
</tr>
<tr>
<th><label for="shipping_street2">Street address 2:</label></th>
<td><input type="text" id="shipping_street2" placeholder="3rd Floor" /></td>
</tr>
<tr>
<th><label for="shipping_city">City:</label></th>
<td><input type="text" id="shipping_city" placeholder="New York" /></td>
</tr>
<tr>
<th><label for="shipping_zip">Zip:</label></th>
<td><input type="text" id="shipping_zip" placeholder="10010" /></td>
</tr>
<tr>
<th><label for="shipping_state">State:</label></th>
<td><input type="text" id="shipping_state" placeholder="NY" /></td>
</tr>
<tr>
<th><label for="shipping_country">Country:</label></th>
<td><input type="text" id="shipping_country" placeholder="United States" /></td>
</tr>
<tr>
<th><label for="shipping_phone">Phone:</label></th>
<td><input type="text" id="shipping_phone" placeholder="+1 212 002 1234" /></td>
</tr>
<tr>
<th><label for="shipping_fax">Fax:</label></th>
<td><input type="text" id="shipping_fax" placeholder="+1 212 002 2345" /></td>
</tr>
<tr>
<th><label for="shipping_email">E-mail:</label></th>
<td><input type="text" id="shipping_email" placeholder="john.smith@gmail.com"/></td>
</tr>
</table>
</div>
<div style="clear:both"></div>
<div style="padding-left:220px;">
<h2>Order Info</h2>
<table>
<tr>
<th><label for="product_id">Product ID:</label></th>
<td><input type="text" readonly="" id="product_id" value="PR-xxx-01" /></td>
</tr>
<tr>
<th><label for="order_title">Order Title:</label></th>
<td><input type="text" readonly="" id="order_title" value="SH1 Order Title" /></td>
</tr>
<tr>
<th><label for="payment_data">Payment data:</label></th>
<td><input type="text" readonly="" id="payment_data" placeholder="Payment data for callback" value="Payment data for callback" /></td>
</tr>
<tr>
<th></th>
<td><input type="submit" value="SUBMIT" /></td>
</tr>
</table>
</div>
</form>
<div style="min-height:150px;"></div>
<script type="text/javascript" charset="utf-8">
paymentInfo = {
product_id: "PR-SH1-01",
billing_address: {
first_name: "John",
last_name: "Smith",
street1: "41st Park Avenue",
street2: "15th Floor",
city: "New York",
zip: "10022",
state: "NY",
country: "United States",
phone: "+1 212 001 1234",
fax: "+1 212 001 2345",
email: "john.smith@my-domain.com"
},
shipping_address: {
first_name: "John",
last_name: "Smith",
street1: "14th Avenue of the Americas",
street2: "3rd Floor",
city: "New York",
zip: "10010",
state: "NY",
country: "United States",
phone: "+1 212 002 1234",
fax: "+1 212 002 2345",
email: "john.smith@my-domain.com"
},
order_title: "SH1 Order Title",
url_ok: "http://yourdomainname.com/plan.php",
url_ko: "http://yourdomainname.com/plan.php",
payment_url: "http://yourdomainname.com/",
payment_data: "Payment data for callback"
};
</script>
</body>
</html>