我在把paypal集成到我的windows8应用程序中遇到了问题。我不确定"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();发布于 2013-09-25 03:24:55
好了,下一个人。“MerchantId”指的是“商家帐户ID”,可在www.sandbox.paypal.com站点的“Profile -> My Business Info”下找到。
我也遇到了问题,因为我输入的描述字符串太长了。确保连接到error事件以获取有意义的错误消息。尽管BuyNow对象具有error属性,但它不会填充错误消息。
buyNow.Error += (sender, e) =>
{
// e has the error
};https://stackoverflow.com/questions/18990018
复制相似问题