public static ConfirmBillingAgreementResponse InvokeConfirmBillingAgreement(IOffAmazonPaymentsService service, ConfirmBillingAgreementRequest request)
        {
            ConfirmBillingAgreementResponse response = null;
            try
            {
                response = service.ConfirmBillingAgreement(request);

                Console.WriteLine("Service Response");
                Console.WriteLine("=============================================================================");
                Console.WriteLine();

                Console.WriteLine("        ConfirmBillingAgreementResponse");
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }
            }
            catch (OffAmazonPaymentsServiceException ex)
            {
                PrintException(ex);
            }
            return response;
        }
 public static ConfirmBillingAgreementResponse ConfirmBillingAgreement(OffAmazonPaymentsServicePropertyCollection propertiesCollection,
     IOffAmazonPaymentsService service, string billingAgreementId)
 {
     ConfirmBillingAgreementRequest request = new ConfirmBillingAgreementRequest();
     request.AmazonBillingAgreementId = billingAgreementId;
     request.SellerId = propertiesCollection.MerchantID;
     return InvokeConfirmBillingAgreement(service, request);
 }
Пример #3
0
        public static ConfirmBillingAgreementResponse ConfirmBillingAgreement(OffAmazonPaymentsServicePropertyCollection propertiesCollection,
                                                                              IOffAmazonPaymentsService service, string billingAgreementId)
        {
            ConfirmBillingAgreementRequest request = new ConfirmBillingAgreementRequest();

            request.AmazonBillingAgreementId = billingAgreementId;
            request.SellerId = propertiesCollection.MerchantID;
            return(InvokeConfirmBillingAgreement(service, request));
        }
Пример #4
0
        public void ConfirmBillingAgreementApiCall()
        {
            ConfirmBillingAgreementRequest getRequestParameters = new ConfirmBillingAgreementRequest();

            getRequestParameters.WithAmazonBillingreementId(Session["amazonBillingAgreementId"].ToString());

            ConfirmBillingAgreementResponse confirmBillingAgrementResponse = client.ConfirmBillingAgreement(getRequestParameters);

            confirm_response.InnerHtml = "<pre><code>" + confirmBillingAgrementResponse.GetJson() + "</code></pre>";
        }
        /// <summary>
        /// constructor initializes the required API request objects
        /// </summary>
        public ChargeRequest()
        {
            getOrderReferenceDetails = new GetOrderReferenceDetailsRequest();
            setOrderReferenceDetails = new SetOrderReferenceDetailsRequest();
            confirmOrderReference    = new ConfirmOrderReferenceRequest();
            authorizeOrderReference  = new AuthorizeRequest();

            getBillingAgreementDetails  = new GetBillingAgreementDetailsRequest();
            setBillingAgreementDetails  = new SetBillingAgreementDetailsRequest();
            confirmBillingAgreement     = new ConfirmBillingAgreementRequest();
            authorizeOnBillingAgreement = new AuthorizeOnBillingAgreementRequest();
        }
Пример #6
0
        public static ConfirmBillingAgreementResponse InvokeConfirmBillingAgreement(IOffAmazonPaymentsService service, ConfirmBillingAgreementRequest request)
        {
            ConfirmBillingAgreementResponse response = null;

            try
            {
                response = service.ConfirmBillingAgreement(request);

                Console.WriteLine("Service Response");
                Console.WriteLine("=============================================================================");
                Console.WriteLine();

                Console.WriteLine("        ConfirmBillingAgreementResponse");
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }
            }
            catch (OffAmazonPaymentsServiceException ex)
            {
                PrintException(ex);
            }
            return(response);
        }
        public void ConfirmBillingAgreementApiCall()
        {
            ConfirmBillingAgreementRequest getRequestParameters = new ConfirmBillingAgreementRequest();
            getRequestParameters.WithAmazonBillingreementId(Session["amazonBillingAgreementId"].ToString());

            ConfirmBillingAgreementResponse confirmBillingAgrementResponse = client.ConfirmBillingAgreement(getRequestParameters);
            confirm_response.InnerHtml = "<pre><code>" + confirmBillingAgrementResponse.GetJson() + "</code></pre>";
        }