Reputation: 11
My code is written in the C# and I am using Paypal API. for the first time I am making payment from customer then it is redirecting to old paypal page having link
I am debugging the code and receiving the express checkout address
"paypal /cgi-bin/webscr?cmd=_express-checkout&token=EC-4M157930054026038"
But its redirecting to old paypal page although its working fine when i make payment secont time with same account. But for the first time with new user its getting redirected to old payment page
Here is my paypal code
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);
}
Upvotes: 1
Views: 152
Reputation: 11
This is the expected behavior as per paypal. Refer to this ticket : https://www.paypal-techsupport.com/app/account/questions/detail/i_id/1327025 I hope this is the same problem you are facing.
Upvotes: 1