<?php
/**
 * Created by Glee Ltd.
 * User: Hieu
 * Date: 19-Jun-19
 * Time: 1:29 PM
 * Description:
 */

namespace Hura8\Interfaces;


interface iPayGate
{
    // create an pay url to redirect users from website to the payment gateway's site
    public function createPayUrl(array $config);

    // process the result return by paygate
    //public function processPayResult();

    /**
     * create payid to sent to vnpay and also track in the system. One order can be paid by multiple installments
     *
     * @param $item_type string 'order', 'wait-order',
     * @param $item_id int id of order
     * @param $expected_amount int the amount to pay in this payment
     * @param $description string
     * @param $user_info array
     * @return int
     */
    public function createPayId($item_type, $item_id, $expected_amount, $description, array $user_info);

    // process the webhook sent by paygate's server
    public function processWebhook();

    // get list of supported banks
    //public function getBankList();
}
