Beispiel #1
0
            /// <summary>
            /// Run the example code.
            /// </summary>
            public static void Main()
            {
                const string MerchantId   = "0";
                const string SharedSecret = "sharedSecret";
                string       orderId      = "12345";
                string       captureId    = "34567";

                IConnector connector = ConnectorFactory.Create(MerchantId, SharedSecret, Client.EuTestBaseUrl);

                Client   client  = new Client(connector);
                IOrder   order   = client.NewOrder(orderId);
                ICapture capture = client.NewCapture(order.Location, captureId);

                UpdateCustomerDetails updateCustomerDetails = new UpdateCustomerDetails()
                {
                    BillingAddress = new Address()
                    {
                        Email = "*****@*****.**",
                        Phone = "57-3895734"
                    }
                };

                try
                {
                    capture.UpdateCustomerDetails(updateCustomerDetails);
                }
                catch (ApiException ex)
                {
                    Console.WriteLine(ex.ErrorMessage.ErrorCode);
                    Console.WriteLine(ex.ErrorMessage.ErrorMessages);
                    Console.WriteLine(ex.ErrorMessage.CorrelationId);
                }
                catch (WebException ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }