示例#1
0
 static public void payWithOrder(PaySDKOrder order, PaySDKChannel channel, PaySDKHandler handler)
 {
                 #if UNITY_ANDROID
     if (null == paysdkImpl)
     {
         paysdkImpl = new AndroidPaySDKImpl();
     }
     paysdkImpl.payWithOrder(order, channel, handler);
                 #elif UNITY_IOS
     PaySDK.resultHandler = handler;
     paysdkImpl.payWithOrder(order, channel);
                 #endif
 }
示例#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);
        }
示例#3
0
        public override void payWithOrder(PaySDKOrder order, PaySDKChannel channel)
        {
            Hashtable orderHash = new Hashtable();

            orderHash.Add("orderId", order.orderId);
            orderHash.Add("amount", order.amount);
            orderHash.Add("subject", order.subject);
            orderHash.Add("appUserId", order.userId);
            orderHash.Add("appUserNickname", order.nickName);
            orderHash.Add("body", order.body);
            orderHash.Add("desc", order.des);
            orderHash.Add("metadata", order.metadata);

            string orderJson = MiniJSON.jsonEncode(orderHash);

            __iosPaySDKPayWithOrder(orderJson, (int)channel, _callbackObjectName);
        }
 public abstract void payWithOrder(PaySDKOrder order, PaySDKChannel channel);
示例#5
0
 static public void payWithOrder(PaySDKOrder order, PaySDKChannel channel, PaySDKHandler handler)
 {
     PaySDK.resultHandler = handler;
     paysdkImpl.payWithOrder(order, channel);
 }