【发布时间】:2014-10-21 14:41:34
【问题描述】:
我正在尝试在我的页面中进行 PayPal 交易。我定义了以下字段:
- 名字
- 姓氏
- 地址
- 电子邮件
- 金额
当我点击继续付款时,它会将我的浏览器正确重定向到 PayPal。之后,我可以使用测试帐户登录并进行测试付款。问题是当我调用print_r 显示return_url 以检查已传递的数据时,我注意到我的输入文本框不存在。
这是发布到 PayPal 的代码:
$firstname = $this->input->post('firstname');
$lastname = $this->input->post('lastname');
$address = $this->input->post('address');
$email = $this->input->post('email');
$config['business'] = 'test@test.com';
$config['return'] = 'http://localhost/test/payment/return_details/';
$config['cancel_return'] = 'http://localhost/test/payment/create-job-listing/';
$config['production'] = FALSE; //Its false by default and will use sandbox
$config["first_name"] = 'asdasd';
$config["last_name"] = 'asasas';
$config['address1'] = 'new york';
$this->load->library('paypal',$config);
$this->paypal->add('Amount',0.1);
$this->paypal->pay(); //Proccess the payment
有人可以帮我解决这个问题吗?
【问题讨论】:
标签: php codeigniter paypal