Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Paypal 嵌入式贝宝登录按钮_Paypal_Paypal Sandbox - Fatal编程技术网

Paypal 嵌入式贝宝登录按钮

Paypal 嵌入式贝宝登录按钮,paypal,paypal-sandbox,Paypal,Paypal Sandbox,全部, 我试图添加一个贝宝登录按钮到我的网站基于。目前,我正在使用PayPal沙盒,因此我使用静态AppID APP-80W284485P519543T 下面是我的JavaScript代码 <script src="https://www.paypalobjects.com/js/external/api.js"></script> <script> paypal.use( ["login"], function(log

全部,

我试图添加一个贝宝登录按钮到我的网站基于。目前,我正在使用PayPal沙盒,因此我使用静态AppID APP-80W284485P519543T

下面是我的JavaScript代码

        <script src="https://www.paypalobjects.com/js/external/api.js"></script>
    <script>
        paypal.use( ["login"], function(login) {
        login.render ({
            "appid": "APP-80W284485P519543T",
            "authend": "https://www.sandbox.paypal.com/",
            "scopes": "profile email address phone https://uri.paypal.com/services/paypalattributes",
            "containerid": "myContainer",
            "locale": "en-us",
            "returnurl": "http://localhost:3000/"
            });
        });
    </script>
当我运行它时,我得到了错误依赖方验证错误:请求中提供的客户端id与任何注册的客户端都不匹配。请检查请求

知道为什么以及如何修复它吗

提前感谢您的帮助

这件事发生在我身上

在沙盒中创建一个卖家

转到卖家的个人资料,检查“使用PayPal凭据登录”下的客户端id,将其用作您的appid。我还只使用了沙盒作为authend的值

有趣的是,在我完成下面的步骤并再次检查配置文件之前,使用PayPal凭据登录不会出现在我面前,我真的不知道为什么:

使用信誉良好的卖家帐户登录www.sandbox.paypal.com

转到: 配置文件->请求API凭据 选项1-贝宝API 设置PayPal API凭据和权限 选项2-请求API凭据以创建自己的API用户名和密码

而且,它只有在我在生产中创建了一个假的应用程序时才开始工作

新的沙盒仍然是测试版


让我知道它是否有效。

您必须提供有效的客户id,如

“使用PayPal登录”按钮正在发送到以下URI,其中包含客户端id

?客户id=eee5d94d000903b29b1263ae5654b369&响应类型=代码和范围=openid%20配置文件%20电子邮件%20地址%20https://uri.paypal.com/services/paypalattributes&redirect_uri=