【发布时间】:2014-02-28 00:45:05
【问题描述】:
我正在使用 Codeigniter 构建一个应用程序,用户可以在其中访问表单以创建他们的个人资料,填写表格后,他们必须通过 Paypal 付款,如果付款成功,则在数据库中创建个人资料。
如何存储表单上提交的数据,以便在 Paypal 付款后使用?
我应该在用户首先提交表单时将其插入数据库吗? 我应该使用会话吗?
表单包含多个文件输入
【问题讨论】:
标签: php mysql forms codeigniter paypal
我正在使用 Codeigniter 构建一个应用程序,用户可以在其中访问表单以创建他们的个人资料,填写表格后,他们必须通过 Paypal 付款,如果付款成功,则在数据库中创建个人资料。
如何存储表单上提交的数据,以便在 Paypal 付款后使用?
我应该在用户首先提交表单时将其插入数据库吗? 我应该使用会话吗?
表单包含多个文件输入
【问题讨论】:
标签: php mysql forms codeigniter paypal
你需要使用Instant Payment Notification(IPN)
Instant Payment Notification (IPN) is a message service that automatically notifies merchants of events related to PayPal transactions. Merchants can use it to automate back-office and administrative functions, like fulfilling orders and providing customers with order status.
【讨论】:
您有沙盒帐户吗?在 Sandbox 中管理您之前的所有测试。
要接收有关贝宝付款的数据,您需要安装库。 这是链接-https://github.com/orderly/codeigniter-paypal-ipn
相应地设置库文件。
在此之后转到您的沙盒帐户的 IPN 模拟器 - https://developer.paypal.com/webapps/developer/applications/accounts
尝试发送 IPN 。
注意 - 要测试 IPN 刺激,您需要实时站点,您不能在 localhost 上进行测试。
【讨论】: