简体   繁体   English

在线交易如何通知应用程序或服务提供商品或服务?

[英]How do online transactions notify the application or service to give the good or service?

I've been searching but have not been able to find this out. 我一直在搜索,但找不到。 Essentially, when you for example buy credits for a game through PayPal or Google Checkout, how is the information of a successful transaction translated from PayPal or Google Checkout so that the Web Site knows to access its database and credit you those credits? 本质上,例如,当您通过PayPal或Google Checkout购买游戏积分时,如何从PayPal或Google Checkout转换成功交易的信息,以便网站知道访问其数据库并将这些积分归功于您?

Thanks 谢谢

PayPal has a multitude of systems for their payment processes, I have personally used the IPN or Instant Payment Notification system. 贝宝(PayPal)在其付款流程中有多种系统,我个人使用过IPN或即时付款通知系统。 How this works is, you setup a page on your website that PayPal will visit when you receive a payment. 运作方式是,您在网站上设置了一个页面,当您收到付款时,贝宝将访问该页面。 When visiting the site, PayPal visits with GET or POST values, which your page should then report back to the site and verify. 访问网站时,PayPal使用GET或POST值进行访问,然后您的页面应将其报告给网站并进行验证。

Once the values are verified as truly coming from PayPal, you can use those values to credit the account and store the purchase information. 一旦这些值被确认为真正来自PayPal,您就可以使用这些值记入帐户并存储购买信息。

I have used this to credit players on my games with credits, and generally I create product IDs using a system that I can then break apart on the back end, and verify against a product database -- so, say my system was 1credit5 meaning 1 credit for 5 dollars, they couldn't use a plugin like Firebug to edit the form to 100000credit5 (or 100,000 credits for $5) because that would not show up as a valid product, and I would be notified as to the fraud. 我用它来积分游戏中的玩家积分,通常我会使用一个系统创建产品ID,然后可以在后端将其拆开,并根据产品数据库进行验证-假设我的系统是1credit5,表示1 5美元,他们就不能使用Firebug这样的插件将表单编辑为100000credit5(或10美元,5美元),因为该表单不会显示为有效产品,因此我会收到有关欺诈的通知。

I'm not sure about any other payment system, but I know there are quite a few tutorials on PayPal's IPN system. 我不确定其他付款系统,但我知道有很多关于PayPal IPN系统的教程。

通常,通知是通过API完成的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM