示例#1
0
        public void showAlert(String msg, MiaCheckoutController controller)
        {
            //Create Alert
            var okAlertController = UIAlertController.Create("", msg, UIAlertControllerStyle.Alert);

            //Add Action
            okAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, (obj) =>
            {
            }));
            // Present Alert
            this.PresentViewController(okAlertController, true, null);
        }
示例#2
0
        public void presentMiaSDK(string paymentID, String paymentURL)
        {
            MiaCheckoutController miaSDK = MiaSDK.CheckoutControllerForPaymentWithID(paymentID, paymentURL, returnURL, cancelURL,
                                                                                     (controller) => {
                // success
                controller.DismissViewController(true, null);
                showAlert("Please check payment status to confirm if payment is successful or cancelled", controller);
            },
                                                                                     (controller) => {
                controller.DismissViewController(true, null);
                showAlert("Payment cancelled", controller);
            },
                                                                                     (controller, error) => {
                controller.DismissViewController(true, null);
                showAlert("Error : {$error}", controller);
            });

            this.PresentViewController(miaSDK, true, null);
        }