load->helper('languag-6ren">
gpt4 book ai didi

codeigniter - "Invalid Token"in ci-merchant with paypal

转载 作者:太空宇宙 更新时间:2023-11-03 16:10:08 26 4
gpt4 key购买 nike

我正在尝试将 Paypal 支付模块与我的一个应用程序集成。为此,我使用了 ci-merchant。我做了以下代码:

Controller :

$this->load->helper('language');
$this->load->library('merchant');
$this->merchant->load('merchant_paypal_express');

$settings = array(
'username' => 'amas***-facilitator_api1.opl****.com',
'password' => '1383***828',
'signature' => 'AQU0e5vuZCvSg*****oSa.sGUDlpAdkd1coWah3Y.Bvq-lz3WLKI-t-q',
'test_mode' => true);

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

$params = array(
'amount' => 100.00,
'currency' => 'USD',
'return_url' => base_url().'payment',
'cancel_url' => base_url().'payment'
);

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

它给了我以下结果:

object(Merchant_response)[23]
protected '_status' => string 'failed' (length=6)
protected '_message' => string 'Invalid token.' (length=14)
protected '_reference' => null
protected '_data' => null
protected '_redirect_url' => null
protected '_redirect_method' => string 'GET' (length=3)
protected '_redirect_message' => null
protected '_redirect_data' => null

请告诉我有关无效 token 错误以及使用 ci-merchat 的最佳方式是什么。

最佳答案

请补充



<p>$settings = $this->merchant->default_settings();</p>

<p>and After that</p>

<p>$settings = array('username' => 'amas*<strong>-facilitator_api1.opl**</strong>.com',</p>

<pre><code> 'password' => '1383***828',

'signature' => 'AQU0e5vuZCvSg*****oSa.sGUDlpAdkd1coWah3Y.Bvq-lz3WLKI-t-q',
'test_mode' => true)
</code></pre>

<p>;</p>

关于codeigniter - "Invalid Token"in ci-merchant with paypal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19677497/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com