【问题标题】:Paypal Api is not redirecting to Express Checkout for the first time payment second time its working finePaypal Api 没有重定向到 Express Checkout 第一次付款第二次工作正常
【发布时间】:2017-04-14 10:57:28
【问题描述】:

我的代码是用 C# 编写的,我使用的是 Paypal API。我第一次从客户那里付款,然后它被重定向到具有链接的旧 paypal 页面

https://www.sandbox.paypal.com/in/cgi-bin/webscr?cmd=_flow&SESSION=gVpVeQy6t1RsmlfDy408oT6n3EL6CXLn3bNYG11jzbks50fwd_qYHvqGcdS&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b0819862118003bc2f4b4f47f01ef0a11094f0

我正在调试代码并接收快速结帐地址"paypal /cgi-bin/webscr?cmd=_express-checkout&token=EC-4M157930054026038" 但它重定向到旧的贝宝页面,尽管当我使用同一帐户进行第二次付款时它工作正常。但是新用户第一次被重定向到旧的支付页面

这是我的支付宝代码

if (string.IsNullOrEmpty(token1))
{
    // Need to be corrected.
    DateTime date = DateTime.Now;
    Agreement agreement = this.oService.CreateBillingAgreement(apiContext1, Plans1, UserID, date, systemdate).Create(apiContext1);
    List<Links>.Enumerator enumerator = agreement.links.GetEnumerator();
    while (enumerator.MoveNext())
    {
        Links current = enumerator.Current;
        if (current.rel.ToLower().Trim().Equals("approval_url"))
            url1 = current.href;

    }
    this.Session.Add(name1, (object)agreement.token);
    //this.Session.Add(name1, "EC-3LA67769U69944606");
    ////token1 = "EC-3LA67769U69944606";
    this.Session["PlanId"] = (object)agreement.plan.id;
    return (ActionResult)this.Redirect(url1);
}

【问题讨论】:

  • 我也有同样的问题,但在 javascript api 中。

标签: c# paypal


【解决方案1】:

这是根据贝宝的预期行为。 参考这张票:https://www.paypal-techsupport.com/app/account/questions/detail/i_id/1327025 我希望这与您面临的问题相同。

【讨论】:

  • 请考虑添加有关您所指票证的更多信息。
猜你喜欢
  • 2014-11-18
  • 2015-09-04
  • 2018-08-05
  • 1970-01-01
  • 2017-09-02
  • 1970-01-01
  • 2011-08-29
  • 2023-03-25
  • 1970-01-01
相关资源
最近更新 更多