کل محتوا را جایزگزین کنید (arianpal.php)
کد PHP:
$MerchantID = $_POST['pp_mid'];
$Password = $_POST['pp_pws'];
$Price = $_POST['pp_amount']; //Price By Toman
$ReturnPath = $_POST['pp_callback_url'];
$ResNumber = 0 ;// Order Id In Your System
$Description = urlencode($_POST['pp_comments']);
$Paymenter = '-';
$Email = '-';
$Mobile = '-';
$client = new SoapClient('http://merchant.arianpal.com/WebService.asmx?wsdl');
$res = $client->RequestPayment(array("MerchantID" => $MerchantID , "Password" =>$Password , "Price" =>$Price, "ReturnPath" =>$ReturnPath, "ResNumber" =>$ResNumber, "Description" =>$Description, "Paymenter" =>$Paymenter, "Email" =>$Email, "Mobile" =>$Mobile));
$PayPath = $res->RequestPaymentResult->PaymentPath;
$Status = $res->RequestPaymentResult->ResultStatus;
exit('mablagh: '.$Price);
if($Status == 'Succeed')
{
Header('Location: '.$PayPath);
}
else
{
echo 'خطا در اتصال به وب سرويس ! '.$Status;
}