c# Paypal 智能按钮服务器端集成 - await.......continually waiting

问题描述

我正在实施贝宝智能按钮的服务器端版本。

目前为此目的使用沙箱帐户。

关注https://developer.paypal.com/docs/checkout/reference/server-integration/setup-sdk/

创建订单 JS 触发我的服务器端代码。以下几行在服务器端进程中似乎没问题(引用 https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/):

OrdersCreateRequest request = new OrdersCreateRequest();
request.Prefer("return=representation");
request.RequestBody(buildrequestBody());
//3. Call PayPal to set up a transaction    

然而在下一行,客户端登录页面开始加载/弹出)......但没有任何反应,下面一行之后的行似乎没有运行。

var response = await PayPalClient.client().Execute(request); // This seems to hang,but putting try catch doesn't seem to run anything either.

请求变量值看起来也有点奇怪:

{Method: POST,RequestUri: '<null>',Version: 1.1,Content: <null>,Headers:
{
  Prefer: return=representation
}}

我想我应该期待 RequestUri 是 sandBox.paypal.com,所以也许这可能是原因。

有没有其他人有这个问题或者可以告诉我哪里可能出错?我知道当我执行旧的 PPE 实施时,PayPal 网站上的文档是错误的,所以我想这可能是类似的情况,但我无法弄清楚。

TIA 斯图

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)