我在将 paypal 集成到我的 Windows 8 应用程序时遇到问题。我不确定“merchantId”应该是什么,我假设术语与开发人员门户上的内容不一致?
在此代码示例中,Execute() 返回 false 而不显示任何提示:
BuyNow buyNow = new BuyNow([I've tried several ids I found from the portal])
{
UseSandbox = true,
};
ItemBuilder itemBuilder = new ItemBuilder(this.product.Name);
itemBuilder.Description(this.product.Description);
itemBuilder.Name(this.product.Name);
itemBuilder.Price((product.SalePrice ?? product.Price).ToString());
itemBuilder.Quantity(1);
itemBuilder.ID (this.product.Id.ToString());
Item item = itemBuilder.Build();
buyNow.AddItem(item);
bool buyNowResult = await buyNow.Execute();