当我调用此方法时。在那个 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();