ZMCreditClass
public interface ZMCreditClass
| Method Summary | |
|---|---|
| void | applyCredit(ZMRequest request) Apply the available credit. |
| void | Check if the cart is compeletely covered by credits and skip payments if so. |
| void | cleanup() Cleanup. |
| array | Get credit form data for this plugin. |
| void | updateCreditAccount(ZMShoppingCartItem item) Update credit account. |
| boolean | validateRequest(ZMRequest request) Process checkout. |
public void applyCredit(ZMRequest request)
Apply the available credit.
public void cartIsCovered()
Check if the cart is compeletely covered by credits and skip payments if so.
public void cleanup()
Cleanup.
public array getRedemptionBlockInfo()
Get credit form data for this plugin.
In the context of a credit class, this usually consists of form elements to enter a gift voucher number or redemption code.
public void updateCreditAccount(ZMShoppingCartItem item)
Update credit account.
It's purpose is to decide whether each product in the cart should add something to a credit account. e.g. for the Gift Voucher it checks whether the product is a Gift voucher and then adds the amount to the Gift Voucher account.
Another use would be to check if the product would give reward points and add these to the points/reward account.
public boolean validateRequest(ZMRequest request)
Process checkout.
Allows a plugin to process the checkout data (ie. gift voucher, coupon code or other). This is the place to validate that data.
true if the request data is valid with respect to this plugins credit data.
Credit class interface.