PDA

View Full Version : مبتدی: اتصال به وب سرویس پرداخت بانک پارسیان



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>";

}

}

}

Hr.Ziggurat
سه شنبه 21 شهریور 1391, 18:07 عصر
آقا نبود کسی؟؟؟؟؟ از بزرگان تالار...

moory1364
شنبه 30 شهریور 1392, 00:43 صبح
دوست عزیز هر با باید یکی به orderId اضافه بشه

rezaonline.net
شنبه 30 شهریور 1392, 11:12 صبح
$orderId=(int) time();