$version
$version : string
Implements Dalenys payment API
$sender : \Dalenys_Api_Sender_Sendable
$hash : \Dalenys_Api_Hash_Hashable
__construct(string $identifier, string $password, array $urls, \Dalenys_Api_Sender_Sendable $sender, \Dalenys_Api_Hash_Hashable $hash)
Instanciate
| string | $identifier | Dalenys identifier |
| string | $password | Dalenys password |
| array | $urls | Dalenys URLS |
| \Dalenys_Api_Sender_Sendable | $sender | The sender object to use |
| \Dalenys_Api_Hash_Hashable | $hash | The hashing object to use |
payment(string $cardPan, string $cardDate, string $cardCryptogram, string $cardFullName, integer $amount, string $orderId, string $clientIdentifier, string $clientEmail, string $clientIP, string $description, string $clientUserAgent, array $options = array()) : array
Directlink payment
You have to specify SENSIBLE payment data (card, cryptogramm...)
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR payment
$result = $api->payment(
'1111222233334444',
'04-15',
132,
'john doe',
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
);
print_r($result);
| string | $cardPan | The card number (sensible) |
| string | $cardDate | The card validity date (sensible) Format mm-yy |
| string | $cardCryptogram | The card cryptogram (sensible) |
| string | $cardFullName | The card full name |
| integer | $amount | The amount (in the currency smallest subdivision Ex: $amount = 100 > 1€) |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $clientIdentifier | The client identifier (ex: login) |
| string | $clientEmail | The client email |
| string | $clientIP | The client public IP |
| string | $description | The transaction descrtiption |
| string | $clientUserAgent | The client user agent |
| array | $options | Some other payment options (@see http://developer.dalenys.com the dalenys api reference for the full list) |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'payment',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
authorization(string $cardPan, string $cardDate, string $cardCryptogram, string $cardFullName, integer $amount, string $orderId, string $clientIdentifier, string $clientEmail, string $clientIP, string $description, string $clientUserAgent, array $options = array()) : array
Directlink authorization
You have to specify SENSIBLE payment data (card, cryptogramm...)
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR payment
$result = $api->authorization(
'1111222233334444',
'04-15',
132,
'john doe',
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
);
print_r($result);
| string | $cardPan | The card number (sensible) |
| string | $cardDate | The card validity date (sensible) Format mm-yy |
| string | $cardCryptogram | The card cryptogram (sensible) |
| string | $cardFullName | The card full name |
| integer | $amount | The amount (in the currency smallest subdivision Ex: $amount = 100 > 1€) |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $clientIdentifier | The client identifier (ex: login) |
| string | $clientEmail | The client email |
| string | $clientIP | The client public IP |
| string | $description | The transaction descrtiption |
| string | $clientUserAgent | The client user agent |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'authorization',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
credit(string $cardPan, string $cardDate, string $cardCryptogram, string $cardFullName, integer $amount, string $orderId, string $clientIdentifier, string $clientEmail, string $clientIP, string $description, string $clientUserAgent, array $options = array()) : array
Directlink credit
You have to specify SENSIBLE card data (card, cryptogramm...)
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR credit
$result = $api->credit(
'1111222233334444',
'04-15',
132,
'john doe',
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
);
print_r($result);
| string | $cardPan | The card number (sensible) |
| string | $cardDate | The card validity date (sensible) Format mm-yy |
| string | $cardCryptogram | The card cryptogram (sensible) |
| string | $cardFullName | The card full name |
| integer | $amount | The amount (in the currency smallest subdivision Ex: $amount = 100 > 1€) |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $clientIdentifier | The client identifier (ex: login) |
| string | $clientEmail | The client email |
| string | $clientIP | The client public IP |
| string | $description | The transaction descrtiption |
| string | $clientUserAgent | The client user agent |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'credit',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
oneClickPayment(string $alias, integer $amount, string $orderId, string $clientIdentifier, string $clientEmail, string $clientIP, string $description, string $clientUserAgent, array $options = array()) : array
This method is used to initiate a oneClick transaction using an ALIAS
You have to process an authorization or a payment with the option CREATEALIAS = yes to get an ALIAS
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR standard payment (with alias creation)
$result = $api->payment(
'1111222233334444',
'04-15',
132,
'john doe',
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
['CREATEALIAS' => 'yes']
);
$result2 = $api->oneClickPayment(
$result['ALIAS'],
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
);
| string | $alias | The card ALIAS |
| integer | $amount | The amount (in the currency smallest subdivision Ex: $amount = 100 > 1€) |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $clientIdentifier | The client identifier |
| string | $clientEmail | The client EMAIL |
| string | $clientIP | The client public IP |
| string | $description | The transaction description |
| string | $clientUserAgent | The client user agent |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'payment',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
oneClickAuthorization(string $alias, integer $amount, string $orderId, string $clientIdentifier, string $clientEmail, string $clientIP, string $description, string $clientUserAgent, array $options = array()) : array
This method is used to initiate a oneClick transaction using an ALIAS
You have to process an authorization or a payment with the option CREATEALIAS = yes to get an ALIAS
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR standard payment (with alias creation)
$result = $api->payment(
'1111222233334444',
'04-15',
132,
'john doe',
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
['CREATEALIAS' => 'yes']
);
$result2 = $api->oneClickAuthorization(
$result['ALIAS'],
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
);
| string | $alias | The card ALIAS |
| integer | $amount | The amount (in the currency smallest subdivision Ex: $amount = 100 > 1€) |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $clientIdentifier | The client identifier |
| string | $clientEmail | The client EMAIL |
| string | $clientIP | The client public IP |
| string | $description | The transaction description |
| string | $clientUserAgent | The client user agent |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'authorization',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
refund(string $transactionId, string $orderId, string $description, array $options = array()) : array
This method is used to refund a transaction
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
$result = $api->refund( 'A123', 'order_123', 'sample refund' );
| string | $transactionId | The transaction id to refund |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $description | The transaction description |
| array | $options |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'refund',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
capture(string $transactionId, string $orderId, string $description, array $options = array()) : array
This method is used to capture an authorization
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
$result = $api->capture( 'A123', 'order_123', 'sample refund' );
| string | $transactionId | The authorization id to capture |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $description | The transaction description |
| array | $options |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'capture',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
subscriptionAuthorization(string $alias, integer $amount, string $orderId, string $clientIdentifier, string $clientEmail, string $clientIP, string $description, string $clientUserAgent, array $options = array()) : array
This method is used to initiate a subscription transaction using an ALIAS
You have to process an authorization or a payment with the option CREATEALIAS = yes to get an ALIAS
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR standard payment (with alias creation)
$result = $api->payment(
'1111222233334444',
'04-15',
132,
'john doe',
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
['CREATEALIAS' => 'yes']
);
$result2 = $api->subscriptionAuthorization(
$result['ALIAS'],
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
);
| string | $alias | The card ALIAS |
| integer | $amount | The amount (in the currency smallest subdivision Ex: $amount = 100 > 1€) |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $clientIdentifier | The client identifier |
| string | $clientEmail | The client EMAIL |
| string | $clientIP | The client public IP |
| string | $description | The transaction description |
| string | $clientUserAgent | The client user agent |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'payment',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
subscriptionPayment(string $alias, integer $amount, string $orderId, string $clientIdentifier, string $clientEmail, string $clientIP, string $description, string $clientUserAgent, array $options = array()) : array
This method is used to initiate a oneClick transaction using an ALIAS
You have to process an authorization or a payment with the option CREATEALIAS = yes to get an ALIAS
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR standard payment (with alias creation)
$result = $api->payment(
'1111222233334444',
'04-15',
132,
'john doe',
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
['CREATEALIAS' => 'yes']
);
$result2 = $api->subscriptionPayment(
$result['ALIAS'],
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
);
| string | $alias | The card ALIAS |
| integer | $amount | The amount (in the currency smallest subdivision Ex: $amount = 100 > 1€) |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $clientIdentifier | The client identifier |
| string | $clientEmail | The client EMAIL |
| string | $clientIP | The client public IP |
| string | $description | The transaction description |
| string | $clientUserAgent | The client user agent |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
The result array. Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Transaction succeded',
'OPERATIONTYPE' => 'payment',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
]
stopNTimes(string $scheduleId, array $options = array()) : array
This method is used to stop a N times scheduling
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR standard payment (with alias creation)
$result = $api->stopNTimes('A123');
| string | $scheduleId | The schedule id |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
redirectForPayment(integer $amount, string $orderId, string $clientIdentifier, string $clientEmail, string $clientIP, string $description, string $clientUserAgent, array $options = array()) : array
Redirect a cardholder to a hosted payment page (wallet or direct debit payment methods)
In case of success, you will have to display the REDIRECTHTML code with a base64_decode to redirect the user to the payment page.
Usage example:
$api = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient('IDENTIFIER', 'PASSWORD');
// 10 EUR standard payment
$result = $api->redirectForPayment(
1000,
'order_123',
'john_doe42',
'john.doe@mail.com',
'178.152.42.44',
'sample transaction',
'firefox'
['CREATEALIAS' => 'yes']
);
echo base64_decode($result['REDIRECTHTML']);
| integer | $amount | The amount (in the currency smallest subdivision Ex: $amount = 100 > 1€) |
| string | $orderId | The orderid (should be unique by transaction, but no unicity check are performed) |
| string | $clientIdentifier | The client identifier |
| string | $clientEmail | The client EMAIL |
| string | $clientIP | The client public IP |
| string | $description | The transaction description |
| string | $clientUserAgent | The client user agent |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
The result array. It will contains a REDIRECTHTML wich contains a base64 redirection code for the payment supplier page. Will look like:
[
'CODE' => '0002',
'MESSAGE' => 'Waiting for redirection',
'OPERATIONTYPE' => 'payment',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
'REDIRECTHTML' => 'ksdjfkldsjfkldjsklfjdsfklds'
]
getTransactionsByTransactionId(string $transactionId, string $destination = null, string $compression = 'GZIP') : array
Get a transaction by this ID
| string | $transactionId | The transaction ID |
| string | $destination | This parameter accept 3 possibilities:
|
| string | $compression | ZIP / GZIP or BZIP |
The result array. It will contains a DATA parameters wich contains the transaction Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Operation succeeded',
'OPERATIONTYPE' => 'payment',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
'DATA' => [
0 => [
'IDENTIFIER' => 'IDENTIFIER',
// ...
]
]
getTransactionsByOrderId(string $orderId, string $destination = null, string $compression = 'GZIP') : array
Get a transaction by order ID
| string | $orderId | The transaction orderid ID |
| string | $destination | This parameter accept 3 possibilities:
|
| string | $compression | ZIP / GZIP or BZIP |
The result array. It will contains a DATA parameters wich contains the transaction Will look like:
[
'CODE' => '0000',
'MESSAGE' => 'Operation succeeded',
'OPERATIONTYPE' => 'payment',
'ORDERID' => 'order_13213',
'TRANSACTIONID' => 'A123',
'DESCRIPTOR' => 'shop'
'DATA' => [
0 => [
'IDENTIFIER' => 'IDENTIFIER',
// ...
]
]
exportTransactions(\date $date, string $destination, string $compression = 'GZIP', array $options = array()) : array
This method is used to recover the list of transactions for a given day or month.
This method only ask for sending a report. The report will be sent by email or http request. This will return the result of the report creation request
| \date | $date | YYYY-MM or YYYY-MM-DD or array(startDate, endDate) |
| string | $destination | This parameter accept 2 possibilities:
|
| string | $compression | ZIP / GZIP or BZIP |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
exportChargebacks(\date $date, string $destination, string $compression = 'GZIP', array $options = array()) : array
Export the list of chargebacked transactions for a given day or month.
This method only ask for sending a report. The report will be sent by email or http request. This will return the result of the report creation request
| \date | $date | YYYY-MM or YYYY-MM-DD or array(startDate, endDate) |
| string | $destination | This parameter accept 2 possibilities:
|
| string | $compression | ZIP / GZIP or BZIP |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
exportReconciliation(\date $date, string $destination, string $compression = 'GZIP', array $options = array()) : array
Export the reconciliation
This method only ask for sending a report. The report will be sent by email or http request. This will return the result of the report creation request
| \date | $date | YYYY-MM or YYYY-MM-DD or array(startDate, endDate) |
| string | $destination | This parameter accept 2 possibilities:
|
| string | $compression | ZIP / GZIP or BZIP |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
exportReconciledTransactions(\date $date, string $destination, string $compression = 'GZIP', array $options = array()) : array
Export the list of reconciled transactions for a given day or month.
This method only ask for sending a report. The report will be sent by email or http request. This will return the result of the report creation request
| \date | $date | YYYY-MM or YYYY-MM-DD or array(startDate, endDate) |
| string | $destination | This parameter accept 2 possibilities:
|
| string | $compression | ZIP / GZIP or BZIP |
| array | $options | Some other payment options (see http://developer.dalenys.com the dalenys api reference for the full list) |
transaction( $orderId, $clientIdentifier, $clientEmail, $clientIP, $description, $clientUserAgent, array $options = array()) : boolean|string
Trigger a transaction
| $orderId | ||
| $clientIdentifier | ||
| $clientEmail | ||
| $clientIP | ||
| $description | ||
| $clientUserAgent | ||
| array | $options |