Description

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".

  • Module add Internal purse section in My account page to manage you purse
  • Adding money to purse use installed in the shop payment modules
  • You can add to purse any amount
  • Customer can submit a request for withdraft
  • Customer can pay for orders from internal purse
  • The administrator can view, add, delete transactions in back office, you can add money to customer account manually
  • In module settings, you can restrict the group of buyers, which is available to the withdraft
  • Available API for purse management

    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

  • In back office "Modules" tab, click "Add Module" and load the module;
  • In the list of modules in the "Payment" find module "Internal Purse" and click "Install" button;
  • Create product "Credit" (better digital) with the price of 1 and the maximum quantity. You can add it in the inactive category, then it will not be visible to customers;
  • In the module settings in "Product Search" field start typing the product name and select it from the drop-down list, or enter a product number in "Product Id" field;
  • You can enter a multiplier for amount payable to your account in "Multiplier" field. If it is greater than 1, the amount credited to the account, more paid by the buyer;
  • You can also enable / disable the payment for orders from internal purse, withdraft request and set a minimum amount for withdraft.
  • Select group of buyers, which will be available withdraft.
  • 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
    

    Characteristics

    • Compability PrestaShop 1.2.x: None
    • Compability PrestaShop 1.3.x: Full
    • Compability PrestaShop 1.4.x: Full
    • Compability PrestaShop 1.5.x: Full

    Reviews (170)