private void onMethodClick(XsollaSavedPaymentMethod pMethod)
        {
            Dictionary <string, object> purchase = new Dictionary <string, object>();

            purchase.Add("saved_method_id", pMethod.GetKey());
            purchase.Add("pid", pMethod.GetPid());
            purchase.Add("paymentWithSavedMethod", 1);
            purchase.Add("paymentSid", pMethod.GetFormSid());
            purchase.Add("userInitialCurrency", pMethod.GetCurrency());
            GetComponentInParent <XsollaPaystationController> ().ChoosePaymentMethod(purchase);
        }
Exemplo n.º 2
0
        private void onClickConfirmReplaced(XsollaSavedPaymentMethod pMethod)
        {
            Logger.Log("Raplaced existing method");
            Dictionary <string, object> reqParams = new Dictionary <string, object>();

            reqParams.Add("id_payment_account", pMethod.GetKey());

            reqParams.Add("saved_method_id", mSelectedMethod.GetKey());
            reqParams.Add("pid", mSelectedMethod.GetPid());
            reqParams.Add("paymentWithSavedMethod", 1);
            reqParams.Add("paymentSid", pMethod.GetFormSid());
            reqParams.Add("type_payment_account", pMethod.GetMethodType());

            Dictionary <string, object> replacedParam = new Dictionary <string, object>();

            replacedParam.Add("replace_payment_account", 1);

            XsollaPaystationController payController = GetComponentInParent <XsollaPaystationController> ();

            payController.FillPurchase(ActivePurchase.Part.PAYMENT_MANAGER_REPLACED, replacedParam);
            payController.ChoosePaymentMethod(reqParams);
        }