PHP Comtrust SOAP api Response Code 5000
I am using Comprust payment api and am developing a SOAP wrapper to call Comtrust functions. And currently use Comtrust demo account by following their documentation and getting the following answer:
stdClass Object ( [RegisterResult] => stdClass Object ( [ResponseCode] => 5000 [ResponseDescription] => Request is not permitted or not authenticated properly [UniqueID] => 1942d0d0-37f5-4504-951e-3343f9b86ea7 [version] => 2.0 [PaymentPortal] => [TransactionID] => ) )
I am using the following code:
$client = new SoapClient("https://demo-ipg.comtrust.ae:2443/MerchantAPI.svc?singleWsdl");
try {
$result = $client->Register(array("request" => array(
'Customer' => 'Demo Merchant',
'Channel' => 'Web',
'Address' => 'demo-ipg.comtrust.ae',
'Language' => 'en',
'Password' => 'Comtrust',
'version' => '2.0',
'Amount' => '99.98',
'Currency' => 'AED',
'OrderID' => '123',
'OrderInfo' => 'Test Info',
'OrderName' => 'Test Name',
'ReturnPath' => 'http://127.0.0.1/jd_ecommerce/',
'TransactionHint' => 'CPT:Y'
)));
print_r($result);
}catch (Exception $e)
{
echo 'Caught exception: ', $e->getMessage(), "\n";
}
I have a certificate file that is in .pfx format and a password. My question is how to transfer a .pfx file with a SOAP envelope. Does anyone have a similar face?
Please, help!!
Thank you in advance
+3
source to share