Checkout - Payment Method

Display available payment methods for the customer to select. It can be filtered based on country.

 

Relevant APIs

 

 

UCommerce.Api
TransactionLibrary.GetBillingInformation()

TransactionLibrary.GetPaymentMethods(country = null)

UCommerce.EntitiesV2
PurchaseOrder
Payments
Payment
PaymentMethod UCommerce Money(amount, currency)

Hands-on

Navigate to “Payment.aspx.cs”. The method “Page_Load” reads available payment methods from Ucommerce and populates the site. The payment methods should be filtered based on selected shipping country.


 

Update Selected Payment Method

Relevant APIs

TransactionLibrary.CreatePayment(
paymentMethodId,
amount = -1,
requestPayment = true,
overwriteExisting = true)

TransactionLibrary.ExecuteBasketPipeline()

Hands-on

When the form is submitted to “SavePaymentAndGoToPreviewBtn_OnClick” eventhandler, you need to update current payment by creating a new one that overrides the existing one. Use the TransactionLibrary to do so.

 

{{lineitem.ProductName}}

{{lineitem.VariantName}} - {{lineitem.Quantity}} x {{lineitem.FormattedPrice}} {{lineitem.FormattedPrice}}

Your cart is empty ;(
Total {{basket.FormattedProductsTotal}}
Checkout