React native 使用重定向方法的支付网关集成

React native 使用重定向方法的支付网关集成,react-native,payment-gateway,React Native,Payment Gateway,我在react native中实现了一个支付网关,它没有任何适用于iOS/Android的SDK/库,它有支付API,可以选择使用web重定向方法支付。我有另一个限制,而付款供应商不提供任何确认API。在付款时,我得到的唯一选择是将用户重定向到一个成功的页面或使用PaymentSuccessWebHook 目前它是按照以下方式实现的 1. User request for a payment 2. Send request to our web server (not payment ser

我在react native中实现了一个支付网关,它没有任何适用于iOS/Android的SDK/库,它有支付API,可以选择使用web重定向方法支付。我有另一个限制,而付款供应商不提供任何确认API。在付款时,我得到的唯一选择是将用户重定向到一个成功的页面或使用PaymentSuccessWebHook

目前它是按照以下方式实现的

1. User request for a payment  
2. Send request to our web server (not payment server).   
3. Our web server generates the payment redirection url and pass it to mobile app
4. Mobile app opens a web view and show user the payment page.   
5. Upon payment, we configure the URL to redirect user to a success URL. (protect it using a randomly generated token which is verified
upon payment)  
6. Mobile app detects that users got redirected to payment success page and confirm that payment is done.
问题是,有时会出现网络中断,导致付款完成后,我们的web服务器无法确认付款。在这种情况下,我认为web钩子将是合适的解决方案。然而,我不确定这是否是处理这一问题的最佳方式

使用重定向方法实现支付网关的任何人。有没有更好的方法或不同的方法来处理这个问题


谢谢。

嘿,你找到解决办法了吗?@Saurabh我用钩子解决了它,成功付款时,它调用定义的URL,我会相应地更新。嘿,你找到解决办法了吗?@Saurabh我用钩子解决了它,成功付款时,它调用定义的URL,我会相应地更新。