Exemple #1
0
        private void onSkipConfirmation(object sender, EventArgs eventArgs)
        {
            /**
             *  Build the MerchantInfo object with the following parameters:
             *  -merchantId
             *  -testMode
             *  -cvcRequired
             */
            MerchantInfo merchant = new MerchantInfo("merchant_id", false);

            /**
             *   Build the OrderInfo object with the following parameters:
             *  -amount
             *  -currencyCode
             */
            OrderInfo order = new OrderInfo(1, "DKK");

            /**
             *   Build the TokenCardInfo object with the following parameters:
             *  -card token pan
             *  -Scheme type
             *  -expiration date
             *  -cardVerificationRequired (if CVV/CVC will be asked)
             *  -useSystemAuth (if CVV/CVC is not required, the option to confirm payment with unlock screen will be prompted if this flag is true)
             */
            TokenCardInfo tokenCardInfo = new TokenCardInfo("4925********0004", SchemeType.Visa, "08/22", false);

            PiaInterfaceConfiguration.Instance.SkipConfirmationSelected = true;

            /**
             * Put the objects in the bundle; access the keys in the PiaSDK class
             */
            Bundle bundle = new Bundle();

            bundle.PutParcelable(PiaSDK.BundleMerchantInfo, merchant);
            bundle.PutParcelable(PiaSDK.BundleOrderInfo, order);
            bundle.PutParcelable(PiaSDK.BundleTokenCardInfo, tokenCardInfo);

            PiaSDK.Instance.Start(this, bundle, new Handler());
        }
Exemple #2
0
        private void onPayWithSavedCard(object sender, EventArgs eventArgs)
        {
            /**
             *  Build the MerchantInfo object with the following parameters:
             *  -merchantId
             *  -testMode
             *  -cvcRequired
             */
            MerchantInfo merchant = new MerchantInfo(merchantIdTest, true);

            /**
             *   Build the OrderInfo object with the following parameters:
             *  -amount
             *  -currencyCode
             */
            OrderInfo order = new OrderInfo(1, "DKK");

            /**
             *   Build the TokenCardInfo object with the following parameters:
             *  -card token pan
             *  -Scheme type
             *  -expiration date
             *  -cardVerificationRequired (if CVV/CVC will be asked)
             *  -useSystemAuth (if CVV/CVC is not required, the option to confirm payment with unlock screen will be prompted if this flag is true)
             */
            TokenCardInfo tokenCardInfo = new TokenCardInfo(tokenIdTest, schemeIdTest, expiryDateTest, true);

            PiaInterfaceConfiguration.Instance.SkipConfirmationSelected = false;

            /**
             * Put the objects in the bundle; access the keys in the PiaSDK class
             */
            Bundle bundle = new Bundle();

            bundle.PutParcelable(PiaSDK.BundleMerchantInfo, merchant);
            bundle.PutParcelable(PiaSDK.BundleOrderInfo, order);
            bundle.PutParcelable(PiaSDK.BundleTokenCardInfo, tokenCardInfo);

            PiaSDK.Instance.Start(this, bundle, new Handler(PaymentMode.SAVED_CARD.ToString(), merchantBaseUrlTest, merchantIdTest));
        }