Find the “PaymentController”. The method Index() renders the view “/views/Payment.cshtml” with the PaymentViewModel. Map available payment methods filtered by country into the model.
Update Selected Payment Method
Relevant APIs
TransactionLibrary.CreatePayment(
paymentMethodId,
amount = -1,
requestPayment = true,
overwriteExisting = true)
TransactionLibrary.ExecuteBasketPipeline()
Hands-on
In the POST method in your PaymentController you need to update current payment by creating a new one that overrides the existing one. Use the TransactionLibrary to do so.