How do I consume this SOAP web service? how do I add the request header?
REF: http://www.eway.com.au/Developer/eway-api/token-payments.aspx
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The easiest way is to use .NET’s built-in support.
In Visual Studio, right click on your project references and ‘Add Service Reference’. Give it the service URL https://www.eway.com.au/gateway/ManagedPaymentService/managedCreditCardPayment.asmx and it will generate a proxy class for you that will do all the work. You can then just e.g.
var client = new eWayServiceReference.managedCreditCardPaymentSoapClient(); client.CreateCustomer(...);
Alternatively you can generate the proxy class from a VS command prompt using svcutil.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0