【问题标题】:CI merchant codeigniter library paypal checkout issuesCI 商家 codeigniter 库 paypal 结帐问题
【发布时间】:2013-09-12 12:05:34
【问题描述】:

我在我的 codeigniter 中使用 Ci 商人,但我得到了这个错误,你能说说我应该怎么做吗?

公共函数 mypaypal() { echo "mypaypal"; }

public function cancel() { echo "cancelled"; }

公共函数索引(){

    $this->load->library('merchant');
    $this->merchant->load('paypal_express');
    $settings = array(
                  'username' => '******',
                  'password' => '******',
                  'signature' => '********',
                  'test_mode' => true
                  );

    $this->merchant->initialize($settings);

    $params = array(
      'amount' => 1.00,
      'currency' => 'USD',
      'return_url' => base_url().'mypaypal',
      'cancel_url' => base_url().'cancel');

    $response = $this->merchant->purchase($params);
    var_dump($response);

    if ($response->success())             {

          var_dump($response);            }           else            {
          $message = $response->message();
          echo('Error processing payment: ');
          exit;           }

      }

我得到了这个错误:

object(Merchant_response)#17 (8) { ["_status":protected]=> string(6) "failed" ["_message":protected]=> string(51) "SSL CA 有问题 证书(路径?访问权限?)" ["_reference":protected]=> NULL ["_data":protected]=> NULL ["_redirect_url":protected]=> NULL ["_redirect_method":protected]=> 字符串(3) "GET" ["_redirect_message":protected]=> NULL ["_redirect_data":protected]=> 空}

【问题讨论】:

    标签: codeigniter ci-merchant


    【解决方案1】:

    SSL CA 证书问题(路径?访问权限?)

    您的服务器没有正确设置根 SSL 证书(它使用它来验证传出连接是否连接到正确的服务器)。

    我建议使用Omnipay(CI-Merchant 的继任者),因为它使用Guzzle 进行 HTTP 连接,它与最新的根 SSL 证书捆绑在一起,因此您无需担心您的服务器拥有它们已安装。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-05
      • 2011-03-02
      • 2013-07-28
      • 2013-10-27
      • 2013-10-15
      • 2011-05-12
      • 2015-04-09
      相关资源
      最近更新 更多