使用Stripe,可以使用destination parameter转发费用。 此Stripe文档包含几种语言的示例,但不包括C#/。NET。
Stripe API reference确实有创建费用的示例,并提到了可选的Destination参数作为Dictionary。这个字典参数是什么样的?
.NET API创建费用参考:
var options = new ChargeCreateOptions
{
Amount = 2000,
Currency = "usd",
Description = "Charge for jenny.rosen@example.com",
SourceId = "tok_visa" // obtained with Stripe.js,
};
var service = new ChargeService();
Charge charge = service.Create(options);
答案 0 :(得分:0)
它看起来像这样:
var chargeOptions = new ChargeCreateOptions()
{
Amount = 2000,
Currency = "usd",
SourceId = "tok_visa",
Destination = new ChargeDestinationCreateOptions{
Amount = 100,
Account = "acct_1DjoxfIPiUij0fru"
}
};
ChargeService chargeService = new ChargeService();
Charge charge = chargeService.Create(chargeOptions);