Exemple #1
0
        partial void UIButton3_TouchUpInside(UIButton sender)
        {
            //Initialize with your secretKey
            CCBilleteraPayment cc = new CCBilleteraPayment("pKFe1P2iYw6z73srBDBx");

            //Add an Item with tax
            cc.addItem("item1", 100, 200, CCBilleteraPayment.IVA_REGULAR_16_);
            //Add an Item without tax
            cc.addItem("item1", 100, 200);

            //Add Total, description, netTotal, tax, tip
            cc.addTotal("total", 100, 200, 20);

            ccService.setJson(cc.getJSON());
            ccService.setCallBack("iosParking://");
            try
            {
                ccService.setSaveTokenListener(this);
                ccService.getToken();
            }
            catch (Exception e)
            {
                //Show error message to the user
            }
        }
Exemple #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            //Deep Link
            if (Intent.HasExtra("al_applink_data"))
            {
                var appLinkData = Intent.GetStringExtra("al_applink_data");

                var alUrl = Intent.Data.ToString();
                Log.Info("Response", alUrl);
            }

            //Initialize with your secretKey
            CCBilleteraPayment cc = new CCBilleteraPayment("pKFe1P2iYw6z73srBDBx");


            //Add an Item with tax
            cc.addItem("item1", 100, 200, CCBilleteraPayment.IVA_REGULAR_16_);
            //Add an Item without tax
            cc.addItem("item1", 100, 200);

            //Add Total, description, netTotal, tax, tip
            cc.addTotal("total", 100, 200, 20);


            button = FindViewById <Button> (Resource.Id.myButton);

            button.Click += delegate {
                ccService = new CCService();
                ccService.setJson(cc.getJSON());
                ccService.setCallBack("parking://parking");

                try{
                    ccService.setSaveTokenListener(this);
                    ccService.getToken();
                }catch (Exception e) {
                    e.PrintStackTrace();
                }
            };
        }