使用 Paypal 登录 API [英] Using Paypal Login API

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

问题描述

我一直在尝试让 Paypal 登录 API 正常工作.

I've been trying to get the Paypal Login API to work.

使用 Paypal 登录

问题一是Paypal Javascript Button Builder 不起作用...没有生成代码.

Problem one is that the Paypal Javascript Button Builder is not working... no code is produced.

问题二是,当我使用Paypal PHP core sdk 生成适当的代码时,它弹出一个什么都不做的屏幕.下面的代码示例:

Problem two is that when I generate the appropriate code using the Paypal PHP core sdk, it pops up a screen that does nothing. Code sample below:

<?php
$sdklib="sdk-core-php-master/lib";
require_once("$sdklib/PPConfigManager.php");
require_once("$sdklib/PPConstants.php");
require_once("$sdklib/common/PPApiContext.php");
require_once("$sdklib/auth/openid/PPOpenIdSession.php");

$apicontext = new PPApiContext(array('mode' => 'sandbox'));
$clientId = "AaggjRACLgNPQNEF83qQchE8_KzyKS4mCxmeaTDHTPSFp4hsGlAx4KPMqfZP";
$scope = array('openid', 'email'); 
$redirectUri = 'http://uc.mithril.com.au/testloginreturn.php';
$openidurl = PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope , $clientId,  $apicontext); 

echo "<a href="$openidurl">Login Here</a>";
?>

再次点击显示的链接会产生一个空白屏幕.是不是我遗漏了一些明显的步骤,或者沙箱现在无法正常工作?

Clicking on the revealed link again produces a blank screen. Is there some obvious step I am missing, or is the Sandbox just not working right now?

推荐答案

为了解决这个问题我

  • 在我的 Paypal Developer 应用程序中创建了一个新应用程序
  • 点击使用 Paypal 登录"功能中的高级选项".
  • 确保勾选了所有客户要求的信息"框.
  • 确保隐私政策"和用户协议"网址转到有效页面.
  • 选中使用无缝结账"和允许尚未通过 PayPal 确认其电子邮件地址的客户"
  • 点击保存.
  • 再次返回并再次输入隐私政策网址,因为第一次没有保存.
  • 确保范围"仅包含有效数据,根据 Paypal 范围

注意:按钮生成器只是间歇性地工作,并且默认范围设置包含无效选项.

NB: The button generator only worked intermittently, and the default scope setting contained invalid options.

这篇关于使用 Paypal 登录 API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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