Hr.Ziggurat
سه شنبه 21 شهریور 1391, 12:20 عصر
سلام دوستان. من واسه اتصال به بانک پارسیان این کدو دارم ، ولی وصل نمیشه و خطا میده و وضعیت 22 رو بر میگردونه. مطمئنم که PIN درسته و IP هم درست دادم. تو رو خدا کمک کنید ، خیلی عجله ای...:افسرده:
function gotoParsian () {
include("nusoap/nusoap.php");
$soapclient = new nusoap_client('https://www.pecco24.com:27635/pecpaymentgateway/eshopservice.asmx?wsdl','wsdl');
if (!$err = $soapclient->getError())
$soapProxy = $soapclient->getProxy() ;
if ( (!$soapclient) OR ($err = $soapclient->getError()) ) {
$error .= $err . "<br />" ;
echo $error ;
} else {
$amount = 1000 ; // here is the posted amount
$orderId = 0; // this function is internal which will get order id
$authority = 0 ; // default authority
$status = 1 ; // default status
$callbackUrl = "payment/paid_parsian/" ; // site call back Url
$params = array(
'pin' => MYPINCODE , // this is our PIN NUMBER
'amount' => $amount,
'orderId' => $orderId,
'callbackUrl' => $callbackUrl,
'authority' => $authority,
'status' => $status
);
$sendParams = array($params) ;
$res = $soapclient->call('PinPaymentRequest', $sendParams);
$authority = $res['authority'];
$status = $res['status'];
if ( ($authority) and ($status==0) ) {
$parsURL = "https://www.pecco24.com:27635/pecpaymentgateway/?au=" . $authority ;
redirectToURL ($parsURL) ;
exit() ;
die() ;
return;
} else {
// this is unsucccessfull connection
echo "<p dir=LTR>ERROR : <br> returned parameters from PARSIAN BANK :<br />";
if ($err=$soapclient->getError()) {
echo "ERROR = $err <br /> " ;
}
echo "authority : $authority <br />" ;
echo "status : $status <br />" ;
echo "orderId : $orderId <br />" ;
echo "Couldn't get proper authority key from Parsian" ;
echo "</p>";
}
}
}
function gotoParsian () {
include("nusoap/nusoap.php");
$soapclient = new nusoap_client('https://www.pecco24.com:27635/pecpaymentgateway/eshopservice.asmx?wsdl','wsdl');
if (!$err = $soapclient->getError())
$soapProxy = $soapclient->getProxy() ;
if ( (!$soapclient) OR ($err = $soapclient->getError()) ) {
$error .= $err . "<br />" ;
echo $error ;
} else {
$amount = 1000 ; // here is the posted amount
$orderId = 0; // this function is internal which will get order id
$authority = 0 ; // default authority
$status = 1 ; // default status
$callbackUrl = "payment/paid_parsian/" ; // site call back Url
$params = array(
'pin' => MYPINCODE , // this is our PIN NUMBER
'amount' => $amount,
'orderId' => $orderId,
'callbackUrl' => $callbackUrl,
'authority' => $authority,
'status' => $status
);
$sendParams = array($params) ;
$res = $soapclient->call('PinPaymentRequest', $sendParams);
$authority = $res['authority'];
$status = $res['status'];
if ( ($authority) and ($status==0) ) {
$parsURL = "https://www.pecco24.com:27635/pecpaymentgateway/?au=" . $authority ;
redirectToURL ($parsURL) ;
exit() ;
die() ;
return;
} else {
// this is unsucccessfull connection
echo "<p dir=LTR>ERROR : <br> returned parameters from PARSIAN BANK :<br />";
if ($err=$soapclient->getError()) {
echo "ERROR = $err <br /> " ;
}
echo "authority : $authority <br />" ;
echo "status : $status <br />" ;
echo "orderId : $orderId <br />" ;
echo "Couldn't get proper authority key from Parsian" ;
echo "</p>";
}
}
}