有谁熟悉 Mollie API?我正在尝试为网上商店设置付款,但我对 Mollie API 了解不多。所以我有2个问题:
Mollie 的 Order API 与 Payment API 类似,但 Order API 更“高级”一点,更适合有产品的网店?那是对的吗?
我得到了以下代码,我假设(根据Mollie 关于付款方式的文档)我可以使用金额和其他附加信息设置付款(订单),然后用户将被重定向到他所在的 Mollie 平台可以选择支付方式。
List<OrderLineRequest> OrderLineList = new List<OrderLineRequest>(); foreach(product in cart) { OrderLineRequest Orderline = new OrderLineRequest(); Orderline.Name = B.GetProductName(ProductID); Orderline.Quantity = Amount; Orderline.UnitPrice = new Amount(Currency.EUR, ProductPrice.ToString()); Orderline.TotalAmount = new Amount(Currency.EUR, (Amount * ProductPrice).ToString()); Orderline.VatRate = "21.00"; Orderline.VatAmount = new Amount(Currency.EUR, ((Amount * ProductPrice)*0,21).ToString()); OrderLineList.Add(Orderline); } IOrderClient orderClient = new OrderClient("my API key"); OrderRequest orderRequest = new OrderRequest() { Amount = new Amount(Currency.EUR, "Amount needs to be paid"), OrderNumber = OrderID.ToString(), Lines = OrderLineList, BillingAddress = new OrderAddressDetails() { GivenName = FirstName, FamilyName = LastName, Email = Email, City = City, Country = Country, PostalCode = PostalCode, StreetAndNumber = Street + " " + HouseNumber }, RedirectUrl = "URL I want to redirect to when payment is done", Locale = Locale.en_US };
我还需要做什么才能将用户重定向到 Mollie 平台进行支付?
非常感谢您花时间阅读本文,希望您能帮助我!
提前致谢!