<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$cardId = 'card_m_01J420XC7KAW655XPP12SC28HS';
$response = $api->Cards->GetPreAuthorizations($cardId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
[
{
"Id": "156686696",
"Tag": null,
"CreationDate": 1669116896,
"AuthorId": "156671912",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 500
},
"RemainingFunds": {
"Currency": "EUR",
"Amount": 0
},
"AuthorizationDate": 1669116904,
"Status": "SUCCEEDED",
"PaymentStatus": "VALIDATED",
"ExpirationDate": 1669678504,
"PayInId": "156686722",
"ResultCode": "000000",
"ResultMessage": "Success",
"SecureMode": "FORCE",
"CardId": "156674899",
"SecureModeReturnURL": null,
"SecureModeRedirectURL": null,
"SecureModeNeeded": false,
"PaymentType": "CARD",
"ExecutionType": "DIRECT",
"StatementDescriptor": null,
"Culture": "EN",
"SecurityInfo": null,
"MultiCapture": true,
"BrowserInfo": null,
"IpAddress": null,
"Billing": null,
"Shipping": null,
"Requested3DSVersion": null,
"Applied3DSVersion": null,
"PreferredCardNetwork": null,
"CardInfo": {
"BIN": "497010",
"IssuingBank": "LA BANQUE POSTALE",
"IssuerCountryCode": "MA",
"Type": "CREDIT",
"Brand": "VISA",
"SubType": null
}
}
]
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$cardId = 'card_m_01J420XC7KAW655XPP12SC28HS';
$response = $api->Cards->GetPreAuthorizations($cardId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
[
{
"Id": "156686696",
"Tag": null,
"CreationDate": 1669116896,
"AuthorId": "156671912",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 500
},
"RemainingFunds": {
"Currency": "EUR",
"Amount": 0
},
"AuthorizationDate": 1669116904,
"Status": "SUCCEEDED",
"PaymentStatus": "VALIDATED",
"ExpirationDate": 1669678504,
"PayInId": "156686722",
"ResultCode": "000000",
"ResultMessage": "Success",
"SecureMode": "FORCE",
"CardId": "156674899",
"SecureModeReturnURL": null,
"SecureModeRedirectURL": null,
"SecureModeNeeded": false,
"PaymentType": "CARD",
"ExecutionType": "DIRECT",
"StatementDescriptor": null,
"Culture": "EN",
"SecurityInfo": null,
"MultiCapture": true,
"BrowserInfo": null,
"IpAddress": null,
"Billing": null,
"Shipping": null,
"Requested3DSVersion": null,
"Applied3DSVersion": null,
"PreferredCardNetwork": null,
"CardInfo": {
"BIN": "497010",
"IssuingBank": "LA BANQUE POSTALE",
"IssuerCountryCode": "MA",
"Type": "CREDIT",
"Brand": "VISA",
"SubType": null
}
}
]
200
Show properties
Show properties
Show properties
1260
whereas JPY 12 would be represented as just 12
).Show properties
1260
whereas JPY 12 would be represented as just 12
).null
.CREATED
, SUCCEEDED
, FAILED
The status of the authorization.WAITING
, CANCELED
, CANCEL_REQUESTED
, EXPIRED
, VALIDATED
, FAILED
The payment status of the deposit preauthorization object:WAITING
– The deposit preauthorization can be used: the preauthorized funds can be captured or the preauthorization can be canceled manually.CANCELED
– Value to pass to manually cancel the deposit preauthorization before use; indicates that the deposit preauthorization was canceled manually.CANCEL_REQUESTED
– The cancellation of the deposit preauthorization has been requested but not yet processed.EXPIRED
– The hold period on the preauthorized funds has ended without it being used.VALIDATED
– Indicates that the preauthorized funds were captured.FAILED
– The pay-in against the preauthorization has failed, but a retry may be possible.PaymentStatus
changes to EXPIRED
if no captures were made or VALIDATED
if at least one capture was made.DEFAULT
, FORCE
, NO_CHOICE
The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are:DEFAULT
– Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer.FORCE
– Requests SCA.NO_CHOICE
– Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA.RegistrationData
.SecureModeNeeded
parameter is set to true
).SecureMode
was used.APPLEPAY
The type of pay-in.WEB
, DIRECT
, EXTERNAL_INSTRUCTION
The type of execution for the pay-in.Show properties
Show properties
en-US
; pattern:^[a-zA-Z]{2}(-[a-zA-Z]{2})?$
)The language of the browser.Show properties
Show properties
Country
is US, CA, or MX.Show properties
Show properties
Country
is US, CA, or MX.V1
, V2_1
The 3DS protocol version to be applied to the transaction.V1
, V2_1
The 3DS protocol version applied to the transaction.VISA
, MASTERCARD
, CB
, MAESTRO
The card network to use, as chosen by the cardholder, in case of co-branded cards.null
is returned.Show properties
DEBIT
, CREDIT
, CHARGE CARD
.The type of card product.AMERICAN EXPRESS
, DISCOVER
, JCB
, MASTERCARD
, VISA
, etc.Note: The possible returned values are numerous and liable to evolve over time.CLASSIC
, GOLD
, PLATINUM
, PREPAID
, etc.Note: The possible returned values are numerous and liable to evolve over time.[
{
"Id": "156686696",
"Tag": null,
"CreationDate": 1669116896,
"AuthorId": "156671912",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 500
},
"RemainingFunds": {
"Currency": "EUR",
"Amount": 0
},
"AuthorizationDate": 1669116904,
"Status": "SUCCEEDED",
"PaymentStatus": "VALIDATED",
"ExpirationDate": 1669678504,
"PayInId": "156686722",
"ResultCode": "000000",
"ResultMessage": "Success",
"SecureMode": "FORCE",
"CardId": "156674899",
"SecureModeReturnURL": null,
"SecureModeRedirectURL": null,
"SecureModeNeeded": false,
"PaymentType": "CARD",
"ExecutionType": "DIRECT",
"StatementDescriptor": null,
"Culture": "EN",
"SecurityInfo": null,
"MultiCapture": true,
"BrowserInfo": null,
"IpAddress": null,
"Billing": null,
"Shipping": null,
"Requested3DSVersion": null,
"Applied3DSVersion": null,
"PreferredCardNetwork": null,
"CardInfo": {
"BIN": "497010",
"IssuingBank": "LA BANQUE POSTALE",
"IssuerCountryCode": "MA",
"Type": "CREDIT",
"Brand": "VISA",
"SubType": null
}
}
]
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$cardId = 'card_m_01J420XC7KAW655XPP12SC28HS';
$response = $api->Cards->GetPreAuthorizations($cardId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
Was this page helpful?