0

当我调用此方法时。在那个 not 语句执行之后。

$this->load->spark('ci-merchant/2.1.1'); # 我们总是从 spark 文件夹中指定完整路径 $this->load->library('merchant'); $this->merchant->load('merchant_paypal_express');

             $settings = $this->merchant->default_settings();

                $settings = array(
                'username' => 'xxxxxxx',
                'password' => 'xxx',
                'signature' => 'xxxxxx',
                'test_mode' => true);
                $this->merchant->initialize($settings);
            // GETING AMOUNT REMAINING.    
                $params = array(
                'amount' => 100.00,
                'currency' => 'USD',
                'return_url' => 'hbs.local/checkout/payment_return',
                'cancel_url' => 'hbs.local/checkout/place_order');
                                    $response = $this->merchant->purchase($params);
                $message = $response->message();
4

1 回答 1

0

由于无效的帐户凭据,我收到了错误。我在 $settings 中设置了真实账户 API 凭据。使用沙盒帐户设置解决了我的问题。

于 2013-09-10T06:23:04.497 回答