[英]codeigniter CI merchant paypal
我需要Paypal集成才能支付訂單。 我已經做的是集成api http://ci-merchant.org/ 。 它的工作原理如需要。轉到Paypal網站,給我付款的選項,但是在我按“付款”按鈕后,它只是重新定位到我成功的已定義頁面,而offcourse則不付款。 這是我的Paypal php代碼:
$this->load->library('merchant');
$this->merchant->load('paypal_express');
$settings = $this->merchant->default_settings();
$settings = array(
'username' => '*',
'password' => '*',
'signature' => '*',
'test_mode' => false,
'solution_type' => array('type' => 'select', 'default' => 'Sole', 'options' => array(
'Sole' => 'merchant_solution_type_sole',
'Mark' => 'merchant_solution_type_mark')),
'landing_page' => array('type' => 'select', 'default' => 'Billing', 'options' => array(
'Billing' => 'merchant_landing_page_billing',
'Login' => 'merchant_landing_page_login')));
$this->merchant->initialize($settings);
if(isset($_POST['pay'])){
$params = array(
'amount' => '0.20',
'currency' => 'USD',
'return_url' => 'pay/succesfull',
'cancel_url' => 'pay/cancel');
$response = $this->merchant->purchase($params);
if ($response->success()){
echo "paid sucesfuly";
}
else
{
$message = $response->message();
echo('Error processing payment: ' . $message);
exit;
}
這是應該完成付款的打印屏幕,但是現在按“付款”后,它會轉到我成功的網站。
聽起來您尚未完成該過程。 Express Checkout的整個流程是...
聽起來您已經得到了#1-4的照顧,甚至還有#5,但您卻錯過了#6。 在調用DECP之前,實際上沒有任何事務發生。 您一定想念那塊。
查找其他PayPal庫的解決方案並正常運行,如果有人需要它,這里是鏈接https://github.com/jersonandyworks/Paypal-Library-by-RomyBlack 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.