Open lauraluiz opened 8 years ago
We also need something like a switch/balancer in Sunrise. If the value of your cart is 0 Euro the order should directly be created and not be forwarded to the Payone Adapter.
Business case: You provide vouchers to your customer, because something went wrong at your last order. Customer orders something for 10 Euro and has a 20 Euro discount. In this case totalAmount in cart is 0 Euro and the customer shouldn't be forwarded to Payone.
Steps
How does the shop know what payment methods are available? --> information will be provided by a config file or custom object
How much is hardcoded in Frontend? --> abstract as much as possible on the Java side --> what can't be abstracted needs to be documented --> Javascript/HTML are frontend specific
Further information:
create new payment object only if new transaction is triggered