示例#1
0
 private static void init()
 {
     providerRefund       = new OffAmazonPaymentsServiceProviderRefund();
     amazonCaptureId      = CLIHelper.getStringFromConsole("capture reference id");
     refundAmount         = CLIHelper.getDoubleFromConsole("refund amount").ToString("0.##");
     providerId           = CLIHelper.getStringFromConsole("provider id");
     creditReversalAmount = CLIHelper.getDoubleFromConsole("credit reversal amount").ToString("0.##");
 }
示例#2
0
 private static void init()
 {
     /************************************************************************
      * Two arguments required for the refund sample
      * First argument is the capture reference id
      * Second argument is the refund amount (The maximum can be refunded is orderAmount + Min(75, 15%)
      ***********************************************************************/
     amazonCaptureId = CLIHelper.getStringFromConsole("capture reference id");
     refundAmount    = CLIHelper.getDoubleFromConsole("refund amount").ToString("0.##");
 }
        public static void Main(string[] args)
        {
            Console.WriteLine("===========================================");
            Console.WriteLine("Welcome to Off Amazon Payments Service Automatic Payments Simple Checkout Sample!");
            Console.WriteLine("===========================================");
            Console.WriteLine();

            string billingAgreementId = CLIHelper.getStringFromConsole("billing agreement id");
            double paymentAmount      = CLIHelper.getDoubleFromConsole("payment amount");
            int    shippingOption     = CLIHelper.getShippingOption();
            OffAmazonPaymentsServiceAutomaticPaymentsSimpleCheckout automaticPayments =
                new OffAmazonPaymentsServiceAutomaticPaymentsSimpleCheckout(billingAgreementId);

            RunSample(automaticPayments, billingAgreementId, paymentAmount, shippingOption);

            Console.WriteLine();
            Console.WriteLine("===========================================");
            Console.WriteLine("End of output. You can close this window");
            Console.WriteLine("===========================================");

            System.Threading.Thread.Sleep(50000);
        }
        public static void Main(string[] args)
        {
            Console.WriteLine("===========================================");
            Console.WriteLine("Welcome to Off Amazon Payments Service Simple Checkout Sample!");
            Console.WriteLine("===========================================");
            Console.WriteLine();

            string orderReferenceId    = CLIHelper.getStringFromConsole("order reference id");
            double orderAmount         = CLIHelper.getDoubleFromConsole("order amount");
            int    authorizationOption = CLIHelper.getAuthorizationOption();
            int    shippingOption      = CLIHelper.getShippingOption();
            OffAmazonPaymentsServiceSimpleCheckout simpleCheckout = new OffAmazonPaymentsServiceSimpleCheckout(orderReferenceId);

            RunSample(orderReferenceId, orderAmount, shippingOption, authorizationOption, simpleCheckout);

            Console.WriteLine();
            Console.WriteLine("===========================================");
            Console.WriteLine("End of output. You can close this window");
            Console.WriteLine("===========================================");

            System.Threading.Thread.Sleep(50000);
        }
示例#5
0
 private static void init()
 {
     reverseProviderCreditInstance = new OffAmazonPaymentsServiceReverseProviderCredit();
     amazonProviderCreditId        = CLIHelper.getStringFromConsole("Provider Credit Id");
     creditReversalAmount          = CLIHelper.getDoubleFromConsole("Credit Reversal Amount").ToString("0.##");
 }