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); }
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>"; }