User Tools

Site Tools


account

Account API description

Web service address

Test web service address (for testing purposes) https://testapi.moneypolo.com:26443/Account.asmx

Production web service address https://api.moneypolo.com:26442/Account.asmx

Please note, that test and production keys are different. Production key will be issued by MoneyPolo company at the end of the testing period.

1. Call methods:

  • Each method can be called by merchant account - every operation will be executed on merchant’s account;
  • Methods can be called by client’s account - every operation will be executed on client’s account.

2. For each operation account must be verified.

3. Each method has a description, request and response parameters, key, and code example.

Security

Access to web service can be restricted by IP (upon client’s demand). Each transmitted request must be signed with a key. MoneyPolo issues a key for the merchant at the beginning of the testing period. The key should be changed when switching to the production environment.

MoneyPolo distributes keys among their clients, which has to be transmitted to web service in parametrical form.

  1. To work with the API, merchant must assign an unique RUID identifier to the each client that will be transmitted to the appropriate Web service methods.
  2. Each request method should have a Signature object:

Signature

Name Type Required Description
MerchantCode string * Merchant's code
Sign string * Signature

Each response method has ErrorResponse object:

Name Type Required Description
ErrorCode int * Error code, or 0 if the answer has no errors.
ErrorMessage string * Error description, or empty line if the answer has no errors.

Signature compiling rules for a Web service request.

Each method has an object sign:

<sign>
  <MerchantCode>string</MerchantCode>
  <Sign>string</Sign>
</sign>

For the correct signature generation (Sign) the following is needed:

  1. produce a concatenation of data, transferred to the method of service in request object, and Key.
  2. apply to the result algorythm SHA512.
  3. transfer the result to the upper case.

Statuses for payments

Status Description
In Process Payment in progress
Processed Payment has been processed
Rejected Payment was rejected
Storned Payment was storned

SEPAPaymentCheck

This method’s purpose is to prepare request to the SEPA system for the new transaction and check if the request meets necessary requirements.

Input parameters of the method are:

Name Type Required Example Description
AccountPerson object * Merchant's Account. Object MoneyPoloAccountPersonData
RealMerchantCode string Not used
MerchantDocumentID string * [0-9a-zA-Z]{1,50} Merchant's document ID
Amount int * 10023 Transfer Amount1
CurrencyCode string(3) * EUR Payment currency code in ISO 4217
CurrencyExponent int * 2 Currency Exponent2
ValueDate string * YYYY-MM-DD Date of payment processing and transferring
PaymentDetails string * [A-Za-z0-9_\-=\.,;:@\*\(\)\[\]\s]{1,255} Payment details
SWIFTCode string(11) * [A-Z]{4}[A-Z]{2}[A-Z0-9]{2}[A-Z0-9]{0,3} Beneficiary Bank SWIFT Code
IBAN string(34) * [A-Z]{2}[0-9]{2}[A-Z0-9]{0,30} Receiver's IBAN in Beneficiary Bank
OriginatorFirstName string * [A-Za-z0-9_\-=\.,;:@\*\(\)\[\]\s]{1,255} Sender's First Name
OriginatorLastName string * [A-Za-z0-9_\-=\.,;:@\*\(\)\[\]\s]{1,255} Sender's Last Name
OriginatorPhone string * +733251234567 Sender's phone number
OriginatorDateOfBirth string * YYYY-MM-DD Sender's date of birth
OriginatorResidentialCountryCode string(2) * [A-Z]{2} Sender's Residential Country
BeneficiaryName string * [A-Za-z0-9_\-=\.,;:@\*\(\)\[\]\s]{1,255} Receiver's Name
AmountAvailable ushort * 1 or 0 Funds charge-off method3

* 1 Amount is positive decimal number. Calculated as Amount*10 at CurrencyExponent. (if the Sum to transfer is 100.23EUR, then it is necessary to declare Amount=10023, CurrencyExponent=2)
* 2 CurrencyExponent (look to ISO 4217, https://en.wikipedia.org/wiki/ISO_4217#Treatment_of_minor_currency_units_.28the_.22exponent.22.29)
* 3 0 – Payment amount+fee will be charged-off from Customer’s account. If there are no enough funds on customer’s account, the error will be returned and payment will not be processed; 1 - Payment amount+fee will be charged-off from the Merchant’s Company account. Customer’s account balance control is not performed;

Signature: AccountPerson.PersonAccountID + AccountPerson.PersonRUID + MerchantDocumentID + Amount + CurrencyCode + CurrencyExponent + ValueDate + PaymentDetails + SWIFTCode + IBAN + OriginatorFirstName + OriginatorLastName + OriginatorPhone + OriginatorDateOfBirth + OriginatorResidentialCountryCode + BeneficiaryName + AmountAvailable + Key

The response of the SEPA server should be checked for the errors. In case of absence of errors the check is considered as successful and the service will send back the attribute RequestID of the prepared transfer in the SEPA system.

Output parameters of the method are:

Name Type Description
RequestID int ID of transfer in the SEPA payment system


PHP Example

//SEPAPaymentCheck
$request['AccountPerson']['PersonAccountID'] = 11111;
$request['AccountPerson']['PersonRUID'] = '2222';
$request['MerchantDocumentID'] = '1';
$request['Amount'] = 10023;
$request['CurrencyCode'] = 'EUR';
$request['CurrencyExponent'] = 2;
$request['ValueDate'] = '2018-03-29';
$request['PaymentDetails'] = 'info';
$request['SWIFTCode'] = 'MAFVGB21';
$request['IBAN'] = 'LT543990000000011111';
$request['OriginatorFirstName'] = 'FirstName';
$request['OriginatorLastName'] = 'LastName';
$request['OriginatorPhone'] = '+420123456789';
$request['OriginatorDateOfBirth'] = '2000-01-01';
$request['OriginatorResidentialCountryCode'] = 'CZ';
$request['BeneficiaryName'] = 'BeneficiaryName';
$request['AmountAvailable'] = '1';
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('SEPAPaymentCheck'); 
}


SEPAPaymentSend

This method’s purpose is to send prepared transfer from the Merchant's account to the SEPA system.

Input parameters of the method are:

Name Type Required Example Description
RequestID int * 171 ID of transfer in SEPA payment system


Signature: RequestID + Key

Output parameters of the method are:

Name Type Description
DocumentID int Identifier of MoneyPolo operation
DocumentStatus string Status of MoneyPolo operation


in case the method returns ErrorCode=998, it is obligatory to call SEPAPaymentCheckStatus and only after that try to resend the transaction with SEPAPaymentSend, but not to create the new payment with SEPAPaymentCheck method.

PHP Example

//SEPAPaymentSend
$request['RequestID'] = 171;
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('SEPAPaymentSend'); 
}

SEPAPaymentCheckStatus

This method’s purpose is to check the Status of already sent transfer in SEPA system

Input parameters of the method are:

Name Type Required Example Description
RequestID int * 171 ID of transfer in SEPA payment system


Signature: RequestID + Key

Output parameters of the method are:

Name Type Description
DocumentID int Identifier of MoneyPolo operation
DocumentStatus string Status of MoneyPolo operation


PHP Example

//SEPAPaymentCheckStatus
$request['RequestID'] = 171;
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('SEPAPaymentCheckStatus'); 
}

SendCZPayment

This method’s purpose is to send Domestic Czech Payment.

Input parameters of the method are:

Name Type Required Example Description
AccountPerson object * See object MoneyPoloAccountPersonData
MerchantDocumentID string * 012 Merchant document ID
AmountAvailable int * 1/0 Flag defines the person who covers payment's expenses([0]client/[1]merchant)
AccountNumber string * 1111111 Local Bank account number
BankCode string * 2010 Local Bank Code
Amount decimal * 100 Transfer Amount
PerformanceDate string * 2016-02-10 Transfer Performance Date
VariableSymbol string 0101010101 Transfer Variable Symbol
SpecificSymbol string 0202020202 Transfer Specific Symbol
MessageToReceiver string Test CZ payment Message To Receiver

Signature: AccountPerson.PersonAccountID + AccountPerson.PersonRUID + MerchantDocumentID + AmountAvailable + AccountNumber + BankCode + Amount + PerformanceDate + VariableSymbol + SpecificSymbol + MessageToReceiver + key

Output parameters of the method are:

Name Type Description
DocumentID int Identifier of MoneyPolo operation
DocumentStatus string Status of MoneyPolo operation

PHP Example

//SendCZPayment
$request['AccountPerson']['PersonAccountID'] = 1111;
$request['AccountPerson']['PersonRUID'] = '2222';
$request['MerchantDocumentID'] = '1';
$request['AmountAvailable'] = '1';
$request['AccountNumber'] = '33225599';
$request['BankCode'] = '2010';
$request['Amount'] = '100';
$request['PerformanceDate'] = '2016-02-08';
$request['VariableSymbol'] = '0101010101';
$request['SpecificSymbol'] = '0202020202';
$request['MessageToReceiver'] = 'Test CZ payment';
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('SendCZPayment'); 
}



SendPLPayment

This method’s purpose is to send Domestic Poland Payment

Input parameters of the method are:

Name Type Required Example Description
AccountPerson object * See object MoneyPoloAccountPersonData
MerchantDocumentID string * 012 Merchant document ID
AmountAvailable int * 1/0 Flag defining who to cover payment expenses([0]client/[1]merchant)
AccountNumber string * 1111111 Local Bank account number
Amount decimal * 100 Transfer Amount
PerformanceDate string * 2016-02-10 Transfer Performance Date
RecipientName string * John Snow Transfer Recipient Name
RecipientAddressStreet string Archeologicka 1 Transfer Recipient Address Street
RecipientAddressPostalCode string 10900 Transfer Recipient Address Postal Code
RecipientCity string Prague Transfer Recipient City
Resident bool * true Resident
PaymentReferenceNote string Test CZ payment Payment Reference Note
SORBNET bool * false SORBNET

Signature: AccountPerson.PersonAccountID + AccountPerson.PersonRUID + MerchantDocumentID + AmountAvailable + AccountNumber + Amount + PerformanceDate + RecipientName + RecipientAddressStreet + RecipientAddressPostalCode + RecipientCity + Resident + PaymentReferenceNote + SORBNET + key

Output parameters of the method are:

Name Type Description
DocumentID int Identifier of MoneyPolo operation
DocumentStatus string Status of MoneyPolo operation

PHP Example

//SendPLPayment
$request['AccountPerson']['PersonAccountID'] = 1406;
$request['AccountPerson']['PersonRUID'] = '126';
$request['MerchantDocumentID'] = '1';
$request['AmountAvailable'] = '1';
$request['AccountNumber'] = '33225599';
$request['Amount'] = '100';
$request['PerformanceDate'] = '2016-02-08';
$request['RecipientName'] = 'John Snow'; 
$request['RecipientAddressStreet'] = 'Archeologicka 1';
$request['RecipientAddressPostalCode'] = '10900';
$request['RecipientCity'] = 'Prague';
$request['Resident'] = 'true';
$request['PaymentReferenceNote'] = 'Test payment';
$request['SORBNET'] = 'false';
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('SendPLPayment'); 
}



SendGBPayment

This method’s purpose is to send Domestic United Kingdom Payment

Input parameters of the method are:

Name Type Required Example Description
AccountPerson object * See object MoneyPoloAccountPersonData
MerchantDocumentID string * 012 Merchant document ID
AmountAvailable int * 1/0 Flag defining who to cover payment expenses([0]client/[1]merchant)
AccountNumber string * 1111111 Local Bank account number
BankSortCode string * 1111111 Bank Sort Code
Amount decimal * 100 Transfer Amount
PerformanceDate string * 2016-02-10 Transfer Performance Date
RecipientName string * John Snow Transfer Recipient Name
PaymentReferenceNote string * Test CZ payment Payment Reference Note

Signature: AccountPerson.PersonAccountID + AccountPerson.PersonRUID + MerchantDocumentID + AmountAvailable + AccountNumber + BankSortCode + Amount + PerformanceDate + RecipientName + PaymentReferenceNote + key

Output parameters of the method are:

Name Type Description
DocumentID int Identifier of MoneyPolo operation
DocumentStatus string Status of MoneyPolo operation

PHP Example

//SendGBPayment
$request['AccountPerson']['PersonAccountID'] = 1406;
$request['AccountPerson']['PersonRUID'] = '126';
$request['MerchantDocumentID'] = '1';
$request['AmountAvailable'] = '1';
$request['AccountNumber'] = '33225599';
$request['BankSortCode'] = '2323';
$request['Amount'] = '100';
$request['PerformanceDate'] = '2016-02-08';
$request['RecipientName'] = 'John Snow'; 
$request['PaymentReferenceNote'] = 'Test payment';
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('SendGBPayment'); 
}





SendRUPayment

This method’s purpose is to send Domestic Russian Payment

Input parameters of the method are:

Name Type Required Example Description
AccountPerson object * See object MoneyPoloAccountPersonData
MerchantDocumentID string * 012 Merchant document ID
AmountAvailable int * 1/0 Flag defining who to cover payment expenses([0]client/[1]merchant)
AccountNumber string * 1111111 Local Bank account number
BankCode string * 2010 Local Bank Code
Amount decimal * 100 Transfer Amount
PerformanceDate string * 2016-02-10 Transfer Performance Date
ReceiverFirstName string
ReceiverMiddleName string
ReceiverLastName string
PaymentReferenceNote string * info Payment Reference Note

Signature: AccountPerson.PersonAccountID + AccountPerson.PersonRUID + MerchantDocumentID + AmountAvailable + AccountNumber + BankCode + Amount + PerformanceDate + ReceiverFirstName + ReceiverMiddleName + ReceiverLastName + PaymentReferenceNote + key

Output parameters of the method are:

Name Type Description
DocumentID int Identifier of MoneyPolo operation
DocumentStatus string Status of MoneyPolo operation

PHP Example

//SendRUPayment
$request['AccountPerson']['PersonAccountID'] = 1111;
$request['AccountPerson']['PersonRUID'] = '2222';
$request['MerchantDocumentID'] = '1';
$request['AmountAvailable'] = '1';
$request['AccountNumber'] = '33225599';
$request['BankCode'] = '2010';
$request['Amount'] = '100';
$request['PerformanceDate'] = '2016-02-08';
...
$request['PaymentReferenceNote'] = 'info';
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('SendRUPayment'); 
}



SendRUPaymentCompany

This method’s purpose is to send Domestic Russian Payment for Companies

Input parameters of the method are:

Name Type Required Example Description
AccountPerson object * See object MoneyPoloAccountPersonData
MerchantDocumentID string * 012 Merchant document ID
AmountAvailable int * 1/0 Flag defining who to cover payment expenses([0]client/[1]merchant)
AccountNumber string * 1111111 Local Bank account number
BankCode string * 2010 Local Bank Code
Amount decimal * 100 Transfer Amount
PerformanceDate string * 2016-02-10 Transfer execution date. Used to enter future date transactions. If empty the payment will be processed ASAP.
ReceiverFirstName string First Name. Must be in cyrrilic. Mandatory if receiver is a person
ReceiverMiddleName string Middle Name. Must be in cyrrilic. Mandatory if receiver is a person
ReceiverLastName string Last Name. Must be in cyrrilic. Mandatory if receiver is a person
ReceiverCompanyName string Company Name. Must be in cyrrilic. Mandatory if receiver is a company
ReceiverCompanyINN string Company INN code. Mandatory if receiver is a company
ReceiverCompanyKPP string Company KPP code. Mandatory if receiver is a company
ReceiverCountry string(2) Receiver country code
ReceiverCity string Receiver's city. Mandatory for corp
ReceiverAddress string Receiver's address. Mandatory for corp
ReceiverPhone string Receiver's phone number. numeric only. (example: 00733251234567)
SenderCompanyName string Company Name. Must be in cyrrilic. Mandatory if sender is a company
SenderCompanyRegistrationNumber string
SenderCompanyRegistrationDate string
SenderCompanyRegistrationAuthority string
SenderCompanyCountry string(2) 2 chars country code
SenderCompanyCity string(50)
SenderCompanyAddress string
SenderFirstName string Sender's First Name for person
SenderMiddleName string Sender's Middle name for person, blank for company
SenderLastName string Sender's Last name for person, blank for company
SenderBirthday string Birthday for person
SenderCountry string(2) 2 chars country code
SenderZipCode string postal (ZIP) code
SenderRegion string
SenderCity string
SenderAddress string
SenderPhone string Sender's phoner number. numeric only. (example: 00733251234567)
SenderDocumentNumber string ID number for person, blank for company
SenderDocumentDate string ID issue date for person, blank for company
SenderDocumentAuthority string ID/certificate of incorporation issuing country, blank for company
SenderDocumentExpiryDate string ID expiry date for person, blank for company
PaymentReferenceNote string * info Payment Reference Note. Could be in latin or Cyrillic

Signature: AccountPerson.PersonAccountID + AccountPerson.PersonRUID + MerchantDocumentID + AmountAvailable + AccountNumber + BankCode + Amount + PerformanceDate + ReceiverFirstName + ReceiverMiddleName + ReceiverLastName + ReceiverCompanyName + ReceiverCompanyINN + ReceiverCompanyKPP + ReceiverCountry + ReceiverCity + ReceiverAddress + ReceiverPhone + SenderCompanyName + SenderCompanyRegistrationNumber + SenderCompanyRegistrationDate + SenderCompanyRegistrationAuthority + SenderCompanyCountry + SenderCompanyCity + SenderCompanyAddress + SenderFirstName + SenderMiddleName + SenderLastName + SenderBirthday + SenderCountry + SenderZipCode + SenderRegion + SenderCity + SenderAddress + SenderPhone + SenderDocumentNumber + SenderDocumentDate + SenderDocumentAuthority + SenderDocumentExpiryDate + PaymentReferenceNote + key

Name Type Description
DocumentID int Identifier of MoneyPolo operation
DocumentStatus string Status of MoneyPolo operation

PHP Example

//SendRUPayment
$request['AccountPerson']['PersonAccountID'] = 1111;
$request['AccountPerson']['PersonRUID'] = '2222';
$request['MerchantDocumentID'] = '1';
$request['AmountAvailable'] = '1';
$request['AccountNumber'] = '33225599';
$request['BankCode'] = '2010';
$request['Amount'] = '100';
$request['PerformanceDate'] = '2016-02-08';
...
$request['PaymentReferenceNote'] = 'info';
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('SendRUPaymentCompany'); 
}



InternalPayment

This method’s purpose is to send Internal Payment to MoneyPolo account

Input parameters of the method are:

Name Type Required Example Description
AccountPerson object * See object MoneyPoloAccountPersonData
AccountNumber string * 9311.1.000.0000001.1 MOneyPolo account number
Amount decimal * 100 Payment Amount
CurrencyCode string * USD Payment Currency Code
AmountAvailable int * 1/0 Flag defining who to cover payment expenses([0]client/[1]merchant)
MerchantDocumentID string * 012 Merchant document ID
Details string * Test Internal payment Payment Details

Signature: AccountPerson.PersonAccountID + AccountPerson.PersonRUID + AccountNumber + Amount + CurrencyCode + AmountAvailable + MerchantDocumentID + Details + key

Output parameters of the method are:

Name Type Description
DocumentID int Identifier of MoneyPolo operation
DocumentStatus string Status of MoneyPolo operation

PHP Example

//InternalPayment
$request['AccountPerson']['PersonAccountID'] = 1406;
$request['AccountPerson']['PersonRUID'] = '126';
$request['AccountNumber'] = '9311.1.000.0000001.1';
$request['Amount'] = '100';
$request['CurrencyCode'] = 'USD';
$request['AmountAvailable'] = '1';
$request['MerchantDocumentID'] = '1';
$request['Details'] = 'Test payment';
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('InternalPayment'); 
}





GetAccountDetails

This method’s purpose is to get details of MoneyPolo account

Input parameters of the method are:

Name Type Required Example Description
AccountNumber string * 9311.1.000.0000001.1 MoneyPolo account number

Signature: AccountNumber + key

Output parameters of the method are:

Name Type Description
AccountName string MoneyPolo account name
Email string MoneyPolo account e-mail
MobilePhoneNumber string MoneyPolo account mobile phone number

PHP Example

//GetAccountDetails
$request['AccountNumber'] = 1406;
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('GetAccountDetails'); 
}





GetAccountStatement

This method’s purpose is to get statmenet of MoneyPolo account

Input parameters of the method are:

Name Type Required Example Description
AccountPerson object * See object MoneyPoloAccountPersonData
CurrencyCode string * USD Currency code
DateFrom string * 2016-05-11 Statement from date
DateTo string * 2016-06-01 Statement to date
Page int * 1 Current page
TransOnPage int * 50 Transactions on page
OperationType string See OperationType
DocumentIDList string See [List of DocumentID's, separated by comma

Signature: AccountPerson + CurrencyCode + DateFrom + DateTo + Page + TransOnPage + OperationType + key

Output parameters of the method are:

Name Type Description
InBal decimal Initial Balance, only for selected currency in request
OutBal decimal Final Balance, only for selected currency in request
TODebit decimal Turnover Debit, only for selected currency in request
TOCredit decimal Turnover Credit, only for selected currency in request
Total int Total transactions for selected period
AccountStatement object List of objects MPTransaction



MPTransaction object

Name Type Description
ID uint Transaction ID
TheDate string Transaction Date & time
Designation string Account number
Description string Account name
CurrencyCode string Transaction curency code
Amount decimal Transaction Amount
AmountBC decimal Transaction Amount in base currency
Balance decimal Balance, only for statemnet with CcurrecnyCode in request
isFee bool Transaction fee flag
DocClass string Operation type
Info string Transaction Info
DocumentID uint Operation ID
Rate decimal Transaction rate for Exchange operation
EmoneyName string Emoney name for emoney operation
Beneficiary string Beneficiary ID
ChequeInfo string Cheque Info for cheque operation
ParentDocClass string Parent operation type, if exists
FileID uint Uploaded File ID for transaction
MerchantDocumentID string Merchant document ID



Operation Types

Code Description
CardFundsDepositQC Card to Account transfer
CardLoading Card Loading
CardProcessing Card Processing
CardRequest Card Request
CardToCardPayments Card To Card Payments
ChequesLoadAcc Cheques (Load Acc)
OutwardEmoneyPayments Outward Emoney Payments
IncomingEmoneyPayments Incoming Emoney Payment
IncomingWire Incoming Wire
InternalPayments Internal Payment
ChequesWithdrawFromAcc Cheques (Withdraw from Acc)
OutwardWire Outward Wire
WithdrawalToCard Withdrawal To Card
DomesticPayment Domestic Payment



PHP Example

//GetAccountStatement
$request['AccountPerson']['PersonAccountID'] = 123;
$request['AccountPerson']['PersonRUID'] = '456';
$request['CurrencyCode'] = 'USD';
$request['DateFrom'] = '2016-05-11';
$request['DateTo'] = '2016-06-01';
$request['Page'] = '1';
$request['TransOnPage'] = '50';
$request['OperationType']  = '';
 
if($accRequest->Prepare_Data($request))
{
    $result = $accRequest->Send('GetAccountStatement'); 
}





MoneyPoloAccountPersonData object

Name Type Required Example Description
PersonAccountID int * 1235 Client’s MoneyPolo account ID
PersonRUID string * “4567” Client’s RUID





PHP Examples

<?php
class Account
{
    protected $service;
 
    private $algo = 'sha512';
 
	private $merchantCode = '--MERCHANTCODE--';
    private $key = '--KEY--';
    private $addr = 'https://testapi.moneypolo.com:26443/Account.asmx?wsdl';		
 
    public $data = array();
 
    /**
    * Constructs the service
    */
    public function __construct ()
    {
        try
        {
            $this->service = new SoapClient($this->addr, array('trace' => 1));
        }
        catch (Exception $e)
        {
            return $e->getMessage();
        }
    }
 
    /**
    * Provides managment of errors calling the service's methods
    */
    public function __call($name, $arguments)
    {
        $result = false;
        $max_retries = 5;
        $retry_count = 0;
 
        while(!$result && $retry_count < $max_retries)
        {
            try
            {
                $result = parent::__call($name, $arguments);
            }
            catch(SoapFault $fault)
            {
                if($fault->faultstring != 'Could not connect to host')
                {
                    throw $fault;
                }
            }
            sleep(1);
            $retry_count++;
        }
        if ($retry_count == $max_retries)
        {
            throw new SoapFault('Could not connect to host after 5 attempts');
        }
        return $result;
    }
 
    public function Prepare_Data($request, $parentName = '')
    {
        $this->data['request'] = array();	
 
		$this->data['request'] = $request;
 
        $this->data['sign']['MerchantCode'] = $this->merchantCode;
 
		$personData = '';
		if(isset($request['AccountPerson']['PersonAccountID'])) 
		{
			$personData  .= $request['AccountPerson']['PersonAccountID'];
		}
		if(isset($request['AccountPerson']['PersonRUID'])) 
		{
			$personData  .= $request['AccountPerson']['PersonRUID'];
			unset($request['AccountPerson']);
		}		
 
		$arrayToImplode = ($parentName != '' && isset($request[$parentName])) ? $request[$parentName] : $request;	
 
		echo $personData.implode('', $arrayToImplode);
 
        $this->data['sign']['Sign'] = strtoupper(
            hash($this->algo, $personData.implode('', $arrayToImplode).$this->key.'')
        );
        return true;
    }
 
    public function Send($methodName = '')
    {
		$result = $this->service->{$methodName}($this->data);
		echo "REQUEST:\n" . htmlspecialchars($this->service->__getLastRequest()) . "\n";
		echo "RESPONSE:\n" . htmlspecialchars($this->service->__getLastResponse()) . "\n";
        return $result;
    }
}
?>
<?php
$timezone = 'Europe/Prague';
date_default_timezone_set($timezone);
 
require_once ('Account.php');
$accRequest = new Account();
$request = array();
 
// put request
 
echo '<h1>Result</h1><pre>';
print_r($result);
echo '</pre>';
?>



Error codes

Error code Description
-8300 “Invalid MerchantDocumentID Format”
-8301 “Invalid Amount Format”
-8302 “Invalid Exponent Format Specified”
-8303 “Invalid CurrencyCode Format”
-8304 “Invalid ValueDate Format”
-8305 “Invalid SWIFT Format”
-8306 “Invalid IBAN Format”
-8307 “Invalid PaymentDetails Format”
-8308 “Invalid OriginatorFirstName Format”
-8309 “Invalid OriginatorLastName Format”
-8310 “Invalid OriginatorPhone Format”
-8311 “Invalid OriginatorDateOfBirth Format”
-8312 “Invalid BeneficiaryName Format”
-8313 “Invalid PersonAccountID Format”
-8314 “Invalid PersonRUID Format”
-8315 “Invalid OriginatorResidentialCountryCode Format”
-8320 “Invalid IBAN Specified”
-8321 “Invalid AccountNumber format”
-8322 “Invalid BankCode format”
-8323 “Invalid Amount format”
-8324 “Invalid PerformanceDate format”
-8325 “Invalid VariableSymbol format”
-8326 “Invalid SpecificSymbol format”
-8327 “Invalid MessageToReceiver format”
-8328 “Failed to complete SendCZPayment process”
-8329 “Invalid MerchantDocumentID format”
-8330 “Payment with the same MerchantDocumentID already exists”
-8331 “Merchant is not found”
-8332 “Person is not properly verified”
-8333 “Invalid AmountAvailable format”
-8334 “Unavailable account balance to make a transaction”
-8335 “Account state is not allowed to make transactions of this kind”
-8336 “Account or Person information is incorrect”
-8337 “Invalid RecipientName format”
-8338 “Invalid RecipientAddressStreet format”
-8339 “Invalid RecipientAddressPostalCode format”
-8340 “Invalid RecipientCity format”
-8341 “Invalid Resident format”
-8342 “Invalid SORBNET format”
-8343 “Invalid PaymentReferenceNote format”
-8344 “Failed to complete SendPLPayment process”
-8345 “Failed to complete SendGBPayment process”
-8346 “Failed to complete InternalPayment process”
-8347 “Beneficiary account is not found”
-8348 “The requested operation is forbidden.”
-8349 “Failed to complete GetCustomerCount process”
-8350 “Failed to complete GetAccountDetails process”
-8351 “Account number is incorrect”
-8352 “Invalid DocumentID format”
-8353 “Invalid ReceiverCompanyName format”
-8354 “Invalid ReceiverCompanyINN format”
-8355 “Invalid ReceiverCompanyKPP format”
-8356 “Invalid ReceiverPhone format”
-8357 “Invalid SenderPhone format”


account.txt · Last modified: 2018/06/26 14:16 by Alexandr Grishin