PHP Comtrust SOAP api 响应代码 5000

标签 php soap payment-gateway soap-client

我正在使用 Comtrust 支付 API 并开发一个 SOAP 包装器来调用 Comtrust 函数。目前正在使用 Comtrust 的模拟账户,按照他们的文档并获得以下响应:

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] => ) )

我正在使用以下代码:

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

我有 .pfx 格式的证书文件和密码。我的问题是如何使用 SOAP 信封传递 .pfx 文件。有人面临类似的问题吗?

请帮忙!!

提前致谢

最佳答案

在 PHP 中,您需要使用 .pem 格式的证书。请使用密码“Comtrust”来访问登台服务器。

关于PHP Comtrust SOAP api 响应代码 5000,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29799041/

相关文章:

php - 使用 PHP PDO 对象连接 MSSQL 数据库

php cURL 返回全部小写

c# - 在 C# 中使用 WSDL 发送和接收

payment-gateway - 在 php 或 cakephp 中集成 Chase 支付

ios - 如何通过手机APP购买实体商品?付款必须使用 CREDITS 而不是现金

ios - 在 iOS 中集成 PayTm 支付

php - Mysql 有条件选择一个值或其倒数

php - jQuery自动保存运行成功功能,但不更新MySQL

php - 如何在 braintree 中获取客户信用卡列表

android - 使用改造参数 `soap12:Body` 使用 xml webservice 在类中没有匹配项