== api.statuscodes ==
==== Description ====
Return Curents defined PV2 API Versionstatus codes.
Please, consider caching result of this command as it changes rarely.
==== Input Parameters ====
None
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>Array</td><td>Array with all Payment Codes and messages</td></tr>
</table>
==== Usage Example ====
```
<?php
$curl = new \Dinke\CurlHttpClient;
//setup payment url and timeout
$payment_url = 'https://dev-payment.datingvip.com/api.json';
$timeout = 30;
//$curl->setCredentials('some-token', 'some-pass');
$post_data = array(
'cmd' => 'api.statuscodes',
);
$response = $curl->sendPostData($payment_url, $post_data, null, $timeout);
if($response === false)
{
//handle errors
}
//decode json to get array
$response = json_decode($response, true);
var_dump($response);
?>
```
Excepted output after running this script should be:
```
array (size=1)
'result' =>
array (size=8)
'code' => int 700
'status' => string 'Action completed succesfully' (length=28)
'command' => string 'api.statuscodes' (length=15)
'result' =>
array (size=81)
600 => string 'Payment Processor Error. Please try again later or if problem persists contact customer support' (length=95)
601 => string 'Credit Card number is not valid' (length=31)
602 => string 'Credit Card CVV2 is not valid' (length=29)
603 => string 'Credit Card Expire Date is not valid' (length=36)
604 => string 'Too many transaction attempt. Please try again later.' (length=53)
620 => string 'PayPal error' (length=12)
605 => string 'Got unexpected response from processor. Please try again or if problem persists contact customer support.' (length=105)
606 => string 'Invalid data sent to processor' (length=30)
607 => string 'The zip/postal code you provided does not match your billing information.' (length=73)
608 => string 'Transaction declined due to insufficient funds. Please try another card.' (length=72)
609 => string 'Your card was declined by the issuing financial institution.' (length=60)
610 => string 'Transaction declined.' (length=21)
611 => string 'Your credit card was blocked by the issuing financial institution. Please try another card.' (length=91)
612 => string 'Invalid credit card data. Please check your card number, expire date and CVV2 and try again.' (length=92)
613 => string 'Not authorized. Please check and correct your credentials.' (length=58)
614 => string 'Original transaction has already been voided, credited, or settled' (length=66)
615 => string 'Transaction was declined because 3-D Secure authentication is required' (length=70)
700 => string 'Action completed succesfully' (length=28)
800 => string 'Invalid data from Client' (length=24)
801 => string 'Missing items in request' (length=24)
802 => string 'Some required data are missing' (length=30)
803 => string 'Invalid Int param sent' (length=22)
804 => string 'Invalid Float param sent' (length=24)
805 => string 'Invalid String param sent' (length=25)
806 => string 'Invalid Hash Format' (length=19)
807 => string 'Invalid Currency' (length=16)
808 => string 'Invalid email data sent' (length=23)
809 => string 'Invalid URL data sent' (length=21)
810 => string 'Invalid Name sent' (length=17)
811 => string 'Invalid CVV2 data sent' (length=22)
812 => string 'Invalid Credit Card data sent' (length=29)
813 => string 'Invalid Credit Card Exp. Date sent' (length=34)
814 => string 'Credit Card is expired' (length=22)
815 => string 'Invalid Unit param sent' (length=23)
816 => string 'Invalid User data params sent' (length=29)
817 => string 'Invalid Transaction data params sent' (length=36)
818 => string 'Can't find matching hash' (length=24)
819 => string 'Can't find matching payment processor account' (length=45)
820 => string 'Can't find matching transaction' (length=31)
840 => string 'Invalid timing parameter provided' (length=33)
841 => string 'Transaction belongs to other partner' (length=36)
842 => string 'Subscription belongs to other partner' (length=37)
821 => string 'Empty or invalid CC data' (length=24)
822 => string 'Invalid refund amount' (length=21)
823 => string 'Submitted credit card is already active on our system' (length=53)
843 => string 'Invalid date' (length=12)
824 => string 'Invalid bank account info' (length=25)
860 => string 'API request not authorized. Please check and correct your credentials' (length=69)
861 => string 'API request is comming from unsecured connection' (length=48)
862 => string 'API request is empty' (length=20)
863 => string 'API request is not well formatted' (length=33)
864 => string 'API request is missing mandatory keys' (length=37)
865 => string 'API command was not found' (length=25)
866 => string 'API command not well formatted' (length=30)
867 => string 'API request sent from unauthorized IP address' (length=45)
868 => string 'API method is not callable' (length=26)
869 => string 'API command execution failed' (length=28)
870 => string 'General database error occurred' (length=31)
871 => string 'Provided option value is not valid' (length=34)
900 => string 'Internal Payment Error' (length=22)
901 => string 'Can't get or create user' (length=24)
902 => string 'Can't get payment ID' (length=20)
903 => string 'Error storing item to DB' (length=24)
904 => string 'Error storing order to DB' (length=25)
905 => string 'Error storing transaction to DB' (length=31)
906 => string 'Error getting ppac_id from DB' (length=29)
907 => string 'Error getting amount for order from DB' (length=38)
908 => string 'Error saving cc data' (length=20)
909 => string 'Can't find matching order' (length=25)
910 => string 'Can't update order status' (length=25)
911 => string 'The subscription has already been deactivated' (length=45)
999 => string 'Undefined status' (length=16)
940 => string 'Error loading partner' (length=21)
941 => string 'PayPal credentials not found' (length=28)
942 => string 'Cannot get transactiopn id by paypal token' (length=42)
943 => string 'Error storing transactiondetails to DB' (length=38)
944 => string 'Error storing subscription to DB' (length=32)...
945 => string 'Error loading subscription from DB' (length=34)...
946 => string 'Cannot find matching PayPal recurring_profile_id' (length=48)...
947 => string 'Error loading transaction from DB' (length=33)
990 => string 'The server is currently down for maintenance work. Please try again in a few minutes.' (length=85)
'request' =>
array (size=3)
'cmd' => string 'api.statuscodes' (length=15)
'token' => string 'some-token' (length=26)
'pass' => string 'some-pass' (length=32)
'ts' => int 1429544091
'origin_ip' => string '93.87.220.184' (length=13)
'errors' => null
```