本文介绍了无效的返回无效的客户端ID或重定向URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在尝试使用PayPal OAuth登录我的Web应用程序。但是,我收到此错误

客户端代码

<script src="https://www.paypalobjects.com/js/external/connect/api.js"></script>
<script>
  paypal.use(["login"], function (login) {
    login.render({
      appid:
        "<I took from the client id>",
      scopes: "openid profile email address",
      containerid: "cwppButton",
      responseType: "code",
      locale: "en-us",
      buttonType: "CWP",
      buttonShape: "pill",
      buttonSize: "md",
      fullPage: "true",
      returnurl: "http://127.0.0.1:8080/paypal-return",
    });
  });
</script>

客户端ID

返回URL

我在这里遗漏了什么,我找不到指向正确方向的错误。

谢谢

推荐答案

使用以下代码,它可以为我工作。我也有同样的问题,并包括了这个:&auend";:";Sandbox";完整代码:

    <span id='lippButton'></span>
    <script src='https://www.paypalobjects.com/js/external/api.js'></script>
    <script>
        paypal.use( ['login'], function (login) {
            login.render ({
                "appid":"<MY APP ID>",
                "authend": "sandbox",
                "scopes":"openid",
                "containerid":"lippButton",
                "responseType":"code",
                "locale":"en-us",
                "buttonType":"LWP",
                "buttonShape":"pill",
                "buttonSize":"lg",
                "fullPage":"true",
                "returnurl":"http://127.0.0.1/CyFlying/public/"
            });
        });
    </script>

这篇关于无效的返回无效的客户端ID或重定向URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 13:00