Example #1
0
        public void ShowPaymentForm()
        {
            GameObject go = GameObject.Instantiate(Resources.Load("PWPrefabs/Brick")) as GameObject;

            go.GetComponent <PWBrickForm> ().UpdateFormInformation(this.merchantName, this.productName, this.amount, this.currency);
            go.GetComponent <PWBrickForm> ().UpdateAPIkey(PWBase.GetAppKey(), PWBase.GetSecretKey());
        }
Example #2
0
        private void RequestCharge(OnRequest request, string token)
        {
            WWWForm form    = new WWWForm();
            var     headers = form.headers;

            headers ["X-ApiKey"] = this.privateKey;
            form.AddField("token", token, Encoding.UTF8);
            form.AddField("amount", this.amount.ToString());
            form.AddField("currency", this.currency);
            form.AddField("email", txtEmail.text);
            form.AddField("fingerprint", "your fingerprint here");
            form.AddField("description", "your description here");

            WWW www = new WWW(PWBase.GetChargeURL(), form.data, headers);

            StartCoroutine(request(www));
        }