i have a payment gateway in my site, but when i use it i catch this error:
soapClient() expects parameter 2 to be array string given
i try to change it to nusoap_client but nothing happend and not refer to bank payment page
i try to set variables in token for testing but i got error
with soap Client i catch this error that the transaction info is illigal for bank
any idea??
my code is :
if ( ! $custom ) {
$Amount = GFPersian_Payments::amount( $Amount, 'IRR', $form, $entry );
}
$MID = self::get_merchant();
$ResNum = time();
$ResNum = apply_filters( 'gf_banksaman_resNum', apply_filters( 'gf_gateway_resNum', $ResNum, $entry, $form ), $entry, $form );
$CellNumber = '';
$MerchantName = 'MID';
$FormAction = 'https://sep.shaparak.ir/Payment.aspx';
if ( ! empty( $config["meta"]["mobilepg"] ) && $config["meta"]["mobilepg"] == '1' ) {
$MerchantName = 'TerminalId';
$FormAction = 'https://sep.shaparak.ir/MobilePG/MobilePayment';
$Mobile = GFPersian_Payments::fix_mobile( $Mobile );
if ( strlen( $Mobile ) > 10 ) {
$CellNumber = $Mobile;
}
}
try {
$SoapClient = new soapClient( 'https://sep.shaparak.ir/payments/initpayment.asmx?wsdl', 'wsdl' );
$Token = $soapProxy->RequestToken( $MID, $ResNum, $Amount, '0', '0', '0', '0', '0', '0', 'ResNum1',
'ResNum2', '0', ''
);
} catch ( SoapFault $e ) {
$error = $e->getMessage();
}
$payform = '<form name="sendsaman" method="POST" action="' . $FormAction . '">
<input type="hidden" name="' . $MerchantName . '" value="' . $MID . '"/>
<input type="hidden" name="Amount" value="' . $Amount . '"/>
<input type="hidden" name="ResNum" value="' . $ResNum . '"/>
<input type="hidden" name="RedirectURL" value="' . $ReturnPath . '"/>
<input type="hidden" name="Token" value="' . $Token . '"/>
<input type="hidden" name="CellNumber" value="' . $CellNumber . '"/>
</form>';
return self::submit_form( $payform, $ajax );
}