سلام
برای ارتباط با درگاه بانک ملت به این خطا میخورم :
خطا : HTTP Error: cURL ERROR: 28: Failed to connect to bpm.shaparak.ir port 443: Timed out
پکیج nusoap رو اضافه کردم به لاراول
public function payment()
{
$terminalId = $this->terminalId;
$userName = $this->userName;
$userPassword = $this->password;
$orderId = $this->orderId;
$amount = $this->amount;
$localDate = date('Ymd');
$localTime = date('Gis');
$additionalData = $this->additionalData;
$callBackUrl = $this->callBackUrl;
$payerId = "0";
$parameters = array(
'terminalId' => $terminalId,
'userName' => $userName,
'userPassword' => $userPassword,
'orderId' => $orderId,
'amount' => $amount,
'localDate' => $localDate,
'localTime' => $localTime,
'additionalData' => $additionalData,
'callBackUrl' => $callBackUrl,
'payerId' => $payerId
);
$client = new \nusoap_client('https://bpm.shaparak.ir/pgwchannel/services/pgw?wsdl');
$client->setCurlOption(CURLOPT_CONNECTTIMEOUT, 1000);
$namespace = 'http://interfaces.core.sw.bps.com/';
$result = $client->call('bpCumulativeDynamicRequest', $parameters, $namespace);
$wsaddr = '';
if ($client->fault) {
echo "خطایی در اتصال به بانک رخ داده است";
exit;
} else {
$err = $client->getError();
if ($err) {
echo "خطا : " . $err;
exit;
} else {
$res = explode(',', $result);
$ResCode = $res[0];
if ($ResCode == "0") {
ActlogController::add(19, true, $parameters, $result);
$wsaddr = 'https://bpm.shaparak.ir/pgwchannel/startpay.mellat';
?>
<form name="paymentform" id="paymentform" method="post" action="<?php echo $wsaddr; ?>">
<input type="hidden" name="TerminalId" value="<?php echo $terminalId; ?>">
<input type="hidden" name="UserName" value="<?php echo $userName; ?>">
<input type="hidden" name="UserPassword" value="<?php echo $userPassword; ?>">
<input type="hidden" name="PayDate" id="PayDate" value="<?php echo $localDate; ?>">
<input type="hidden" name="PayTime" id="PayTime" value="<?php echo $localTime; ?>">
<input type="hidden" name="PayAmount" id="PayAmount" value="<?php echo $amount; ?>">
<input type="hidden" name="PayOrderId" id="PayOrderId" value="<?php echo $orderId; ?>">
<input type="hidden" name="PayAdditionalData" id="PayAdditionalData" value="<?php echo $additionalData; ?>">
<input type="hidden" name="PayCallBackUrl" id="PayCallBackUrl" value="<?php echo $callBackUrl; ?>">
<input type="hidden" name="PayPayerId" id="PayPayerId" value="<?php echo $payerId; ?>">
<input type="hidden" name="RefId" id="RefId" value="<?php echo $res[1]; ?>">
</form>
<br>
<script type="text/javascript">
document.getElementById('paymentform').submit();
</script>
<?php
exit;
} else {
echo 'خطا : '. $this->CheckStatus($result);
exit;
}
}
}
}
به مصطفی کمک کنید تا مشکل خودش را حل کند؛ اینطور میتوانیم با هم پیشرفت کنیم.
آیا مایل به ارسال نوتیفیکیشن و اخبار از طرف راکت هستید ؟