Esempio n. 1
0
        private void frm_FormClosed(object sender, FormClosedEventArgs e)
        {
            try
            {
                if (!StartTransaction.OK)
                {
                    ClearDebug();
                    AddDebug("CANCELLED!");
                    return;
                }
                APISettings.InitAPI();
                ClearDebug();
                PAYNLSDK.API.Transaction.Start.Request fixture = LastRequests.LastTransactionStart;
                InitRequestDebug(fixture);
                DumpNvc(fixture.GetParameters());

                APISettings.Client.PerformRequest(fixture);
                DebugRawResponse(fixture);
                tbMain.Text = fixture.Response.ToString();

                string url = fixture.Response.Transaction.PaymentURL;
                System.Diagnostics.Process.Start(url);
            }
            catch (ErrorException ee)
            {
                AddDebug("~~EXCEPTION~~");
                AddDebug(ee.Message);
            }
        }
Esempio n. 2
0
        private async void frm_FormClosed(object sender, FormClosedEventArgs e)
        {
            try
            {
                if (!StartTransaction.OK)
                {
                    ClearDebug();
                    AddDebug("CANCELLED!");
                    return;
                }

                ClearDebug();
                PAYNLSDK.API.Transaction.Start.Request fixture = LastRequests.LastTransactionStart;
                InitRequestDebug(fixture);
                Dumpparameters(fixture.GetParameters(APISettings.ServiceID));

                await APISettings.Client.PerformRequestAsync(fixture);

                DebugRawResponse(fixture);
                tbMain.Text = fixture.Response.ToString();

                string url = fixture.Response.Transaction.PaymentURL;
                OpenUrl(url);
            }
            catch (ErrorException ee)
            {
                AddDebug("~~EXCEPTION~~");
                AddDebug(ee.Message);
            }
        }
Esempio n. 3
0
        private void startuseFixtureToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ClearDebug();
                PAYNLSDK.API.Transaction.Start.Request fixture = TransactionStart.GetFixtureNoProductLines();
                InitRequestDebug(fixture);
                DumpNvc(fixture.GetParameters());

                MyStaticPayNlClient.Client.PerformRequest(fixture);
                DebugRawResponse(fixture);
                tbMain.Text = fixture.Response.ToString();

                string url = fixture.Response.Transaction.PaymentUrl;
                System.Diagnostics.Process.Start(url);
            }
            catch (PayNlException ee)
            {
                AddDebug("~~EXCEPTION~~");
                AddDebug(ee.Message);
            }
        }
Esempio n. 4
0
        private async void startuseFixtureToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ClearDebug();
                PAYNLSDK.API.Transaction.Start.Request fixture = TransactionStart.GetFixtureNoProductLines();
                InitRequestDebug(fixture);
                Dumpparameters(fixture.GetParameters(APISettings.ServiceID));

                await APISettings.Client.PerformRequestAsync(fixture);

                DebugRawResponse(fixture);
                tbMain.Text = fixture.Response.ToString();

                string url = fixture.Response.Transaction.PaymentURL;
                OpenUrl(url);
            }
            catch (ErrorException ee)
            {
                AddDebug("~~EXCEPTION~~");
                AddDebug(ee.Message);
            }
        }