Ejemplo n.º 1
0
        public void payWithTicketId(string ticketId, PaySDKChannel channel, PaySDKHandler handler)
        {
            AndroidTicketOrder aOrder = new AndroidTicketOrder();

            aOrder.setTicketId(ticketId);
            AndroidPayApi        api      = createPayApi(channel);
            AndroidOnPayListener listener = AndroidOnPayListener.create(api, aOrder, handler);

            api.pay(aOrder, listener);
        }
Ejemplo n.º 2
0
        public void payWithOrder(PaySDKOrder order, PaySDKChannel channel, PaySDKHandler handler)
        {
            AndroidPayOrder aOrder = new AndroidPayOrder();

            aOrder.setAmount((int)order.amount);
            aOrder.setBody(order.body);
            aOrder.setDescription(order.des);
            aOrder.setMetadata(order.metadata);
            aOrder.setOrderNo(order.orderId);
            aOrder.setSubject(order.subject);
            AndroidPayApi        api      = createPayApi(channel);
            AndroidOnPayListener listener = AndroidOnPayListener.create(api, aOrder, handler);

            api.pay(aOrder, listener);
        }