角2贝宝 [英] Angular 2 paypal

查看:26
本文介绍了角2贝宝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 angular 2 和 firebase 建立一个新的电子商务项目.我的问题是如何集成贝宝按钮,当客户点击它时,他们将被重定向到贝宝并付款,然后重定向回我的网站.目前,我设法按照此 github 存储库中的说明,使用给定的返回 url 支付或取消了 tnhem:https://github.com/musale/angular2-paypal问题是如何从贝宝获取数据以确保付款成功,然后我们才能继续处理订单.我知道我们可以通过 paypal IPN 或 PDT 获得它们,但不知道如何使用 angular 2 firebase.解决方案、示例或建议将受到赞赏.

I am setting up a new ecommerce project with angular 2 and firebase. My issue is how to integrate a paypal button and when customers click on it, they will be redirected to paypal and pay then redirect back to my site. At the moment I manage to get tnhem back either they pay or cancel with a given return url as instructed in this github repo: https://github.com/musale/angular2-paypal The problem is how to get data from paypal to assure that payment was successful before we can proceed with the order. I understand that we can get them either by paypal IPN or PDT but dont know how to with angular 2 firebase. Solutions, examples or suggestions would be apreciated.

推荐答案

感谢大家的解决方案,这是我们延迟的解决方案:由于 Firebase 控制后端,因此无法在其上设置支付系统,我们设置了一个灯-weight nodejs express 服务器托管在谷歌云平台上,每次我们的客户付款时,它可以与贝宝通信以从贝宝接收 IPN 数据.IPN 数据将用于检查来自 Firebase 的实时数据并将付款状态更新到客户端.

Thanks all for the solutions and here is our delayed solution: as Firebase controls the backend, it is impossible to setup a payment system on it, we setup a light-weight nodejs express server hosted on google cloud platform which can communicate with paypal to receive IPN data from paypal each time our customer makes a payment. The IPN data will be used to check with realtime data from Firebase and updates payment status to client side.

这篇关于角2贝宝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆