The functionality will be =
- Enter the gift card number (16 digits)
- Enter the PIN of the gift card (6 digits)
- Enter the amount (amount entered by the user)
I have already created the entry fields mentioned above on the cart page. But I do not know how to continue.
view of the cart page: https://www.happyvalleytea.com/checkout/cart/ (add any product to the cart)
When the user clicks on the button to apply the gift card, the transaction will be made at an external provider (through a call to the API). The response received from the API should be used as a discount on the cart page.