I am currently trying to automate some calls based on the products purchased in a cart using code. Here's a life cycle that I'd like to follow:
1. Customer adds desired products to cart
2. Customer adds coupon to cart
3. Customer pays total after the discount is applied and total payment is received
4. Verify payment is successful
5. Digital products in the cart are sent to them separately via email
I have a couple of questions on how to execute this:
- How do get the total after the coupon has been applied?
- How can I verify that the payment has been made from the shopping cart page?
- How can I access the items in the cart after the payment has been verified?
Thank you for your time