嵌入式PayPal登录按钮 [英] Embedded PayPal Login Button

查看:125
本文介绍了嵌入式PayPal登录按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部

我正在尝试基于 https://developer.paypal.com/webapps/developer/docs/classic/loginwithpaypal/integration/.当前,我使用的是PayPal沙箱,因此我使用静态的AppID"APP-80W284485P519543T"(

I am trying to add a PayPal login button to my site based on https://developer.paypal.com/webapps/developer/docs/classic/loginwithpaypal/integration/. Currently, I am using PayPal sandbox therefore I use the static AppID "APP-80W284485P519543T" (https://www.x.com/developers/paypal/documentation-tools/quick-start-guides/paypal-apis-getting-started-guide).

以下是我的JavaScript代码

The following is my JavaScript code

        <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>

运行它时,出现错误依赖方验证错误:请求中提供的client_id与任何已注册的客户端都不匹配.请检查请求."

When I run it, I got the error "Relying Party Validation error: client_id provided in the request does not match any of the registered clients. Please check the request."

有人知道为什么以及如何解决它吗?

Any idea why and how to fix it?

预先感谢您的帮助!

推荐答案

您必须像

https://developer.paypal.com/webapps/developer/applications/accounts

使用PayPal登录的按钮正在发送到包含client_id的以下URI

the login with PayPal button is sending to below URI which contains client_id

https://www.paypal.com/webapps/auth/协议/openidconnect/v1/授权? client_id = eee5d94d000903b29b1263ae5654b369 & response_type = code& scope = openid%20profile%20email%20address%20https://uri.paypal.com/services/paypalattributes& redirect_uri =

https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize?client_id=eee5d94d000903b29b1263ae5654b369&response_type=code&scope=openid%20profile%20email%20address%20https://uri.paypal.com/services/paypalattributes&redirect_uri=https://developer.paypal.com/webapps/developer/access&nonce=05d0a60ee1f44361f449496505e05116&state=784d8bc3fe3a48a5105b4f8ddd8ae0e7

这篇关于嵌入式PayPal登录按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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