1
我的代码是用C#编写的,我使用的是PayPal API。在我第一次做从客户付款则重定向到老贝宝页面有链接贝宝Api不重定向到第一次付款第一次付款第二次其工作正常
我调试的代码和接收快速结账地址但其重定向到旧的PayPal页面,虽然它的工作正常,当我用同一个帐户付款时间。但对于第一次用新的用户其被重定向到旧的付款页面
这里是我的PayPal代码
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。 – Noitidart