简体   繁体   English

React Native PayPal 集成而不依赖服务器?

[英]React Native PayPal integration without server dependency?

I have tried with using Web view and having a Node server with paypal-rest-sdk as backend.我曾尝试使用 Web 视图并使用带有 paypal-rest-sdk 作为后端的 Node 服务器。

The flow seems to be a work around.流程似乎是一种解决方法。 Is there any way to directly integrate the Paypal with React Native code without any server calls or web views.有什么方法可以直接将 Paypal 与 React Native 代码集成,而无需任何服务器调用或 Web 视图。

This isn't really a React question -- if no server is used, then you would be doing a client-only HTML/JS integration such as this one: https://developer.paypal.com/demo/checkout/#/pattern/client这不是一个真正的 React 问题——如果没有使用服务器,那么您将进行仅客户端的 HTML/JS 集成,例如: https : //developer.paypal.com/demo/checkout/#/模式/客户端

That's possible to do.这是可以做到的。 It would all be happening in a full mobile web experience, which then becomes the PayPal Checkout.这一切都将发生在完整的移动网络体验中,然后成为 PayPal Checkout。


If your question was whether it's technically possible to do "server"-style REST API calls from a purely native React app, please put that thought out of your mind.如果您的问题是从纯原生 React 应用程序执行“服务器”式 REST API 调用在技术上是否可行,请不要考虑这个想法。 Your 'secret' API key should never be in the possession of a client-side App.您的“秘密”API 密钥永远不应为客户端应用程序所拥有。

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

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