简体   繁体   English

Android app 和 Web Api 之间的支付网关集成

[英]Payment Gateway Integration between Android app and Web Api

This is my first time integrating a payment gateway.这是我第一次集成支付网关。 I am trying to integrate FlutterWave Payment gateway in my application.我正在尝试将FlutterWave支付网关集成到我的应用程序中。 Its an Android app native with .net Web Api/Rest as backend.它是一个Android 应用程序,使用.net Web Api/Rest作为后端。 We deduct amount from customer credit card and as soon as payment is completed, on success we update the role of user to Pro in database.我们从客户信用卡中扣除金额,一旦付款完成,我们会在数据库中将用户角色更新为 Pro。 I am stuck as where should I integrate the payment gateway.我被困在哪里应该集成支付网关。

  1. Gateway integration at Android Side : Open the payment gateway screen in android app and take information from user and call the flutterwave api from android app. Android 侧的网关集成:在 android 应用程序中打开支付网关屏幕并从用户那里获取信息并从 ZC531B32A5DA52ED126447D359E70C05721A8AAZ 应用程序 ZC531B32364CEEC1 调用颤振波 api。 On success, post the information to the our web api.成功后,将信息发布到我们的 web api。 Issue in this strategy is, if the mobile internet connection gets lost or app is closed, the payment would have been completed without our backend server knowing about it and we would have lost all information related to transaction.这个策略的问题是,如果移动互联网连接丢失或应用程序关闭,支付将在我们的后端服务器不知道的情况下完成,我们将丢失与交易相关的所有信息。
  2. Gateway integration at Web Api side : Takes information from user in android app and post the information to our server. Web Api 端的网关集成:从 android 应用程序中的用户获取信息并将信息发布到我们的服务器。 On the server, the flutterwave api is called with the posted information and response is saved in database and notified to android app.在服务器上,flutterwave api 被调用,发布的信息和响应保存在数据库中,并通知给 android 应用程序。 Advantage is no information is lost about the transaction but sending card/bank related information from android to Web Api will be secured or not, and how to integrate the OTP process in it.优点是不会丢失有关交易的信息,但从 android 到 Web Api 发送卡/银行相关信息将得到保护,以及如何将其集成到 OTP 中。 We have SSL on our domain and should I save the CVV in database?我们的域上有 SSL,我应该将 CVV 保存在数据库中吗?

To do that securely and correctly you must use WebHook.要安全且正确地执行此操作,您必须使用 WebHook。 you pay on the Android side and do nothing else on this side.您在 Android 一侧付款,而在此一侧不做任何其他事情。 To notify and update data you must implement a webhook on the API side.要通知和更新数据,您必须在 API 端实现 webhook。

this is the documentation link for WebHook on FlutterWave这是 FlutterWave 上 WebHook 的文档链接

https://developer.flutterwave.com/docs/events#what-is-a-webhook https://developer.flutterwave.com/docs/events#what-is-a-webhook

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

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