2checkout Payment Gateway Reviewed by Momizat on . Get SID from https://www.2checkout.com HTML Form Page [php] <form method="post" action="https://www.2checkout.com/checkout/spurchase"> Get SID from https://www.2checkout.com HTML Form Page [php] <form method="post" action="https://www.2checkout.com/checkout/spurchase"> Rating: 0

2checkout Payment Gateway

Get SID from https://www.2checkout.com

HTML Form Page

<form method="post" action="https://www.2checkout.com/checkout/spurchase">
<input type="hidden" name="sid" value="XXXXXXX"/>
<input type="hidden" name="cart_order_id" value="1102"/>
<input type="hidden" name="total" value="100"/>
<input type="hidden" name="c_prod_1" value="1,1"/>
<input type="hidden" name="c_name_1" value="Name"/>
<input type="hidden" name="c_description_1" value="description"/>
<input type="hidden" name="c_price_1" value="100"/>
<input type="hidden" name="merchant_order_id" value="<?php echo mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y")); ?>"/>
<input type="hidden" name="id_type" value="1"/>
<input type="hidden" name="return_url" value="sitename.com/success.php" />
<input type="hidden" name="x_Receipt_Link_URL" value="sitename.com/notify.php" />
<input name="submit" type="submit" value="Pay Now" align="middle" style="padding:2px 25px" />
</form>

After Form Submition
2checkout

notify.php Page

<?php
if($_POST['credit_card_processed'] == "Y")
{
		// Coding Satement or database query operations
		$cart_id = $_POST['cart_order_id'];
		$payment_amount = $_POST['total'];		
		$txn_id = $_POST['order_number'];
		$invoice = $_POST['merchant_order_id'];
	header("location:"sitename.com/success.php");
	exit();
}
else
{
	echo "Problem";
}
?>

Leave a Comment

© 2014 Powered By