Ejemplo n.º 1
0
    /// <summary>
    /// 获得预支付订单
    /// </summary>
    /// <param name="e"></param>
    /// <param name="args"></param>
    private void OnPrePay(PrePay2Client e, object[] args)
    {
        Debug.LogWarning("OnPrePay=======partnerId==:" + e.prepay_id + "===" + e.storeName.ToString());

        //判断是否需要重发支付
        if (SDKManager.GetReSendPay(e.storeName.ToString()))
        {
            OnPayInfo onPayInfo = new OnPayInfo();
            onPayInfo.isSuccess = true;
            onPayInfo.goodsId   = e.goodsID;
            onPayInfo.storeName = e.storeName;
            onPayInfo.receipt   = e.mch_orderID;
            onPayInfo.price     = payInfo.price;
            PayReSend.Instance.AddPrePayID(onPayInfo);
        }

        if (SDKManager.GetPrePay(e.storeName.ToString()))
        {
            payInfo.orderID   = e.mch_orderID;
            payInfo.prepay_id = e.prepay_id;

            SDKManagerNew.Pay(payInfo);
            StartLongTimeNoResponse();
        }
    }