public array GetBankData( array $member )
Returns a customer's bank data.
Type | Parameter | Mandatory | Description |
---|---|---|---|
integer | $partnerid | yes | Partner ID. |
string | $signkey | yes | Sign key. |
string | $username | yes | User name. (max. 25 characters) |
string | $password | yes | Password. (max. 16 characters) |
Type | Key | Description |
---|---|---|
integer | paymentoption |
Payment method. Possible values are:
|
string | accountowner | Account owner. |
string | accountnumber | Account number or IBAN for EU countries. |
string | routingnumber | Routing-/ABA # /Sort Code. |
string | bankname | Bank name. |
string | swiftcode | Swift code. |
string | bankzipcode | Bank ZIP code. |
string | bankcity | Bank city. |
string | bankstreet | Bank street. |
string | bankcountry | ISO 3166-1 alpha-2 two-letter country code. See Countries. |
string | bankstate | ISO 3166-2 two-letter state code. See US States. |
string | paypalaccount | PayPal account. |
string | checkpayableto | Check payable to. |
string | checkstreet | Check street. |
string | checkcity | Check city. |
string | checkstate | ISO 3166-2 two-letter state code. See US States. |
string | checkzipcode | Check ZIP code. |
string | checkcountry | ISO 3166-1 alpha-2 two-letter country code. See Countries. |
<?php
try {
// Create a new client by providing the endpoint to the constructor.
$client = new SoapClient(
null,
[
'location' => 'https://api.sedo.com/api/v1/',
'soap_version' => SOAP_1_1,
'encoding' => 'UTF-8',
'uri' => 'urn:SedoInterface',
'style' => SOAP_RPC,
'use' => SOAP_ENCODED,
]
);
// Set the values for the array
$params = [
'partnerid' => 1234,
'signkey' => 'abcdefghijklmnopqrstuvwxyz0123456789',
'username' => 'johndoe',
'password' => 'secret',
];
// Call the SOAP method
$result = $client->GetBankData($params);
// Display the result
while (list ($key, $val) = each ($result))
{
echo "$key => $val<br />\n";
}
} catch (SoapFault $e) {
echo 'Error: '.$e->getMessage();
}
<?php
/* URL to Sedo's API */
$baseUrl = 'https://api.sedo.com/api/v1/GetBankData?';
/* API function parameters */
$params = [
'partnerid' => 1234,
'signkey' => 'abcdefghijklmnopqrstuvwxyz0123456789',
'username' => 'johndoe',
'password' => 'secret',
];
/* build request URL */
$request = $baseUrl . http_build_query($params);
/* fire API request */
$fp = @fopen($request, 'r');
/* read response line by line */
while (!@feof($fp)) {
echo fread($fp, 4096);
}
/* close the connection */
fclose($fp);
For a successful request, you will receive an XML document as response in this format:
<?xml version="1.0" encoding="UTF-8"?>
<SEDOBANKDATA ver="1.0">
<paymentoption type="xsd:int">0</paymentoption>
<accountowner type="xsd:string">John Doe</accountowner>
<accountnumber type="xsd:string">123456789</accountnumber>
<routingnumber type="xsd:string">987654321</routingnumber>
<bankname type="xsd:string">Johnson National Bank</bankname>
<swiftcode type="xsd:string">1234USRC987</swiftcode>
<bankstreet type="xsd:string">Bank Road 1</bankstreet>
<bankcity type="xsd:string">Racoon City</bankcity>
<bankstate type="xsd:string">UC</bankstate>
<bankzipcode type="xsd:string">54321</bankzipcode>
<bankcountry type="xsd:string">US</bankcountry>
<paypalaccount type="xsd:string"></paypalaccount>
<checkpayableto type="xsd:string"></checkpayableto>
<checkstreet type="xsd:string"></checkstreet>
<checkcity type="xsd:string"></checkcity>
<checkstate type="xsd:string"></checkstate>
<checkzipcode type="xsd:string"></checkzipcode>
<checkcountry type="xsd:string"></checkcountry>
</SEDOBANKDATA>
For an unsuccessful request, you will receive an XML document as response in this format:
<?xml version="1.0" encoding="UTF-8"?>
<SEDOFAULT ver="1.0">
<faultcode type="xsd:string">Exxx</faultcode>
<faultstring type="xsd:string">xxxxxx</faultstring>
</SEDOFAULT>
// Create package sedoapi:
// java org.apache.axis.wsdl.WSDL2Java -av -p sedoapi https://api.sedo.com/api/v1/?wsdl
import sedoapi.*;
import org.apache.axis.AxisFault;
public class SedoGetBankData
{
public static void main(String[] args) throws Exception
{
sedoapi.SedoInterfaceServiceLocator locator = new sedoapi.SedoInterfaceServiceLocator();
sedoapi.SedoInterfacePortType port = locator.getSedoInterfacePort();
try {
BankDataRequest request = new BankDataRequest();
request.setPartnerid(1234);
request.setSignkey("abcdefghijklmnopqrstuvwxyz0123456789");
request.setUsername("johndoe");
request.setPassword("secret");
BankDataResponse response = port.getBankData(request);
System.out.println("Paymentoption: " + response.getPaymentoption());
System.out.println("Accountowner: " + response.getAccountowner());
System.out.println("Accountnumber/IBAN: " + response.getAccountnumber());
System.out.println("Routingnumber: " + response.getRoutingnumber());
System.out.println("Bankname: " + response.getBankname());
System.out.println("SWIFT code: " + response.getSwiftcode());
System.out.println("Bankstreet: " + response.getBankstreet());
System.out.println("Bankcity: " + response.getBankcity());
System.out.println("Bankstate: " + response.getBankstate());
System.out.println("Bankzipcode: " + response.getBankzipcode());
System.out.println("Bankcountry: " + response.getBankcountry());
System.out.println("PayPalaccount: " + response.getPaypalaccount());
System.out.println("Check payeble to: " + response.getCheckpayableto());
System.out.println("Checkstreet: " + response.getCheckstreet());
System.out.println("Checkcity: " + response.getCheckcity());
System.out.println("Checkstate: " + response.getCheckstate());
System.out.println("Checkzipcode: " + response.getCheckzipcode());
System.out.println("Checkcountry: " + response.getCheckcountry());
} catch (AxisFault fault) {
System.err.println("Faultcode : " + fault.getFaultCode());
System.err.println("Faultstring : " + fault.getFaultString());
}
}
}