【发布时间】:2021-03-01 19:41:49
【问题描述】:
尊敬的 StackOverflow 社区, 我们已经开始在我们的项目中实现 PayPal .Net SDK。
我们使用以下代码创建付款:
var payment = Payment.Create(GetDefaultApiContext(), new Payment
{
intent = "sale",
payer = new Payer
{
payment_method = "paypal"
},
transactions = new List<Transaction>
{
new Transaction
{
description = "Test",
invoice_number = "009",
amount = new Amount
{
currency = "EUR",
total = "41.00",
details = new Details
{
tax = "0",
shipping = "0",
subtotal = "40",
handling_fee = "1"
}
},
item_list = new ItemList
{
items = new List<Item>
{
new Item
{
name = "Room 12",
currency = "EUR",
price = "10",
quantity = "4",
}
}
}
}
},
redirect_urls = new RedirectUrls
{
return_url = "https://google.de/",
cancel_url = "https://google.de/"
}
});
付款也被创建并生成相应的链接。如果我们现在用我们的测试账户付款,这笔钱没有被借记,也没有任何事情发生,转发也能正常工作。但是,不会向 PayPal 报告任何交易。
如果有人能帮助我们解决这个问题,那就太好了。
谢谢!
【问题讨论】:
标签: c# .net paypal paypal-sandbox paypal-rest-sdk