Exemple #1
0
        /// <summary>
        /// This is where you would send your payment to be processed - here we will
        /// simply present a confirmation screen. If your payment processor failed the
        /// payment you would return `completion(PKPaymentAuthorizationStatus.Failure)` instead. Remember to never
        /// attempt to decrypt the payment token on device.
        /// </summary>
        public void DidAuthorizePayment(PKPaymentAuthorizationViewController controller, PKPayment payment, Action <PKPaymentAuthorizationStatus> completion)
        {
            paymentToken = payment.Token;

            var ccApi = CCCAPI.Instance();

            //Verifyng - Apple pay token got from apple
            Console.WriteLine("CC API paymentToken = " + paymentToken);
            //Card Connect Verifying - Endpoint
            Console.WriteLine("CC API End point = " + ccApi.Endpoint);

            ccApi.GenerateTokenForApplePay(payment, (theToken, error) =>
            {
                //Card Connect token, which should be used to finalize the payment through one of the server sdks of card connect.
                Console.WriteLine("CC API theToken = " + theToken);

                if (!String.IsNullOrWhiteSpace(theToken))
                {
                    completion(PKPaymentAuthorizationStatus.Success);
                }
                else
                {
                    completion(PKPaymentAuthorizationStatus.Failure);
                }
            });
        }
Exemple #2
0
 public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
 {
     // Override point for customization after application launch.
     // If not required for your application you can safely delete this method
     CCCAPI.Instance().Endpoint      = "fts.cardconnect.com:6443";
     CCCAPI.Instance().EnableLogging = true;
     return(true);
 }