Personal customer purse - Prepayment
Short description Personal customer purse - Prepayment
Module create a personal purse of the buyer from which he can make payments for orders

Module create a personal purse of the buyer from which he can make payments for orders
Module creates a personal purse of the buyer in my account page. This purse can be replenished by buying credits (configurable in the settings module) and make payments for orders. The administrator can view the status of the buyer's purse and add money to it.
The module also provides an API for managing internal purse, through which you can create modules like rewards customers or referral program.
After installing the module in My Account page will be added "Internal Purse", where you can view the history of account transactions, add money to purse via payment systems currently installed in the store and send ask for a withdraft.
After enter amount that you want add to purse, to cart added corresponds to the amount quantity of products (Credits). Further actions are similar standart order process. After payment of the order amount is added to purse of the buyer.
Requests to withdraft the administrator can view at page "Modules-> Internal Purse". After committing the payment status of the request must be changed to "Payment completed".
In "My Account" page will be added "Internal Purse" section, in which you can view the history of account transactions, add money to purse via payment systems currently installed in the store and ask for a withdraft.
You can pay for orders from internal purse
API for purse management
For purse managment include modules/internalpurse/classes/InternalPurseCore.php file in you module Get purse balance: InternalPurseCore::getBalance($id_customer, $id_currency); $id_customer - customer id $id_currency - result currence (by default false - default currency) result - float Purse transactions list: InternalPurseCore::getPayments($id_customer, $id_currency); $id_customer - customer id $id_currency - result currence (by default false - default currency) result - transactions array, sorted by date id_internalpurse - transaction id id_order - order id id_customer - customer id id_product - product id state - transaction status total - transaction amount description - transaction description date_add - added date date_upd - updated date Search payments by params: InternalPurseCore::PaymentExists($id_order, $id_product, $id_customer); $id_order - order id $id_product - product id $id_customer - customer id result - array of transactions Transaction statuses: InternalPurseCore::SELL - Adding from selling (for external modules) InternalPurseCore::PAYOUT_NOTACTIVE - Widraft asced, but not completed InternalPurseCore::PAYOUT_ACTIVE - Widraft completed InternalPurseCore::BUY - Bying via internal purse InternalPurseCore::REFERRAL - Referral bonus (for external modules) InternalPurseCore::PAYIN - Adding to purse from customer InternalPurseCore::INC - Increase purse InternalPurseCore::DEC -Decrease purse Adding transaction: $operation = new InternalPurseCore(); $operation->id_order = 1; $operation->id_customer = 1; $operation->id_product = 1; $operation->state = InternalPurseCore::DEC; $operation->total = -10.99; $operation->description = 'some description'; $operation->add(); Hook displayInternalpurseAccount displayed in "Internal purse" page in fron office