from flask import Blueprint
from app.helpers import m2m

bp = Blueprint("services", __name__)
bp.cli.help = "Payement test ..."


@bp.cli.command("payment")
def payment():
    """
    Payment test.

    $ flask services payement
    """

    print("Checking Network")
    result = m2m.do_check_network("12345678", "123456")
    print(result)

    # print("Payment")
    # result = m2m.do_payment('12345678', '123456', 20, '000000')
    # print(result)

    # print("Confirmation")
    # result = m2m.do_confirmation('12345678', '123456', 1230, '000000', '405', '000081', '5188606087034853', '1810')
    # print(result)

    # print("Ticket")
    # data = m2m.from_packet("001003011003008123456780040061234560200020101400830012018015006161616")
    # result = m2m.do_payment(data)
    # print(result)
