- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在将 CI-Merchant 集成到一个 Codeigniter 项目中,以便使用 Paypal 和 SagePay 处理付款。
我已经完成了 http://ci-merchant.org/ 的演示对于 paypal_express 并且有效(或者至少在我使用示例代码时给了我一个正确的错误 - 请参阅下面的 paypal 代码响应)
Merchant_response Object
(
[_status:protected] => failed
[_message:protected] => Security header is not valid
[_reference:protected] =>
[_data:protected] =>
[_redirect_url:protected] =>
[_redirect_method:protected] => GET
[_redirect_message:protected] =>
[_redirect_data:protected] =>
)
我更新了Sagepay的代码如下
public function index()
{
$this->load->helper('language');
$this->load->library('merchant');
$this->merchant->load('sagepay_direct');
$settings = array (
'vendor' => 'testvendor',
'test_mode' => FALSE,
'simulator_mode' => TRUE,
);
$this->merchant->initialize($settings);
$params = array(
'description'=>'Test purchase',
'currency'=>'GBP',
'transaction_id'=>'12345',
'email'=>'test@person.com',
'first_name'=>'Test',
'last_name'=>'Person',
'address1'=>'1 Random Avenue',
'address2'=>'Made Up Drive',
'city'=>'Notarealcity',
'postcode'=>'FA11 1KE',
'country'=>'UK',
'region'=>'',
'phone'=>'0101010101',
'amount'=>125.00,
'card_no'=>'4444444444444444',
'name'=> 'Mr Test',
'card_type' => 'VISA',
'exp_month'=> 11,
'exp_year'=> 15,
'csc'=> 999
);
$response = $this->merchant->purchase($params);
echo '<pre>';
print_r($response);
exit;
}
代码的输出是
Merchant_response Object
(
[_status:protected] => failed
[_message:protected] =>
[_reference:protected] =>
[_data:protected] =>
[_redirect_url:protected] =>
[_redirect_method:protected] => GET
[_redirect_message:protected] =>
[_redirect_data:protected] =>
)
这没有给我任何关于可能出错的信息。
我正在使用有效的供应商名称并将服务器的 IP 地址输入到 SagePay 模拟器中,请求来自的页面是 https,并且请求来自的 URL 添加到 sage pay 模拟器帐户部分.
看起来应该不错,但现在卡住了 - 我真的很感激任何帮助。
提前致谢
杰森
最佳答案
PayPal 错误通常意味着您正尝试在测试模式下使用真实账户,反之亦然。
我不确定为什么 Sagepay 根本不报告任何错误。这可能与本地化错误消息的 lang() 函数有关,但我不确定。您可能需要向 merchant_sagepay.php 添加一些调试行以查看真正的响应是什么。
关于codeigniter - CI-Merchant & SagePay - 似乎无法让它做出任何回应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13618592/
我已经构建了一个 Paypal 表单,如下例所示 ` 测试部分成功完成。但我不知道如何使用买家的交易 ID 检索 Paypal 响应,以便更改数据库中有
我成功发出了第一个请求,并且我想在其他类中访问我的 Volley 响应,我该怎么做,因为当我尝试这样做时,它会返回空响应 最佳答案 使用接口(interface)和回调 public interf
我真的被困在这里,老实说,我自己看不出有什么问题,而且我在我的网站上已经做过好几次这样的事情了。 我希望我的主页最多更新三个最新的新闻更新。我的表都设置了一个用于测试的条目。这是我的 php 代码,用
您好,我正在尝试回显从 mysqli 查询中选择的 2 个列,但看起来我做错了什么。 require('db_access.php'); $result = mysqli_query($db_conn
开始学习 PHP,在学习了基本的东西之后,这很容易,因为我在学校学习 C++,而且大部分东西都是相似的,我从 mysql 开始。一切正常,但我无法让 connect_errno 正常工作。 复制并粘贴
什么是命运 react ? Techempower.com 使用它们来对 Web 框架进行基准测试。我正在撰写有关 PHP 框架的文章,我想要一个易于理解的财富响应定义。 最佳答案 您可以在相关 te
我是初学者,所以我希望你能理解我。 我希望它在名为 usr 的 cookie 不为假时回显 javascript 代码。第一个 echo 完美运行,但 jquery 根本无法运行。 szeretlek
respond_to 可能不是那么明显?在 ruby 中工作。考虑一下: class A def public_method end protected def protect
我是一名优秀的程序员,十分优秀!