API getCheckoutList
Richiesta
{
"data":{
"request":{
"getCheckoutListRequest":{
"merchantId":"4198",
"dateFrom":"2018-02-05",
"dateTo":"2018-02-06",
"signature":"AAIR12345"
}
}
}
}
Risposte
200 Success
{
" response":{
"getCheckoutListResponse":{
"status":"000",
"checkoutList":[
{
"externalId":"xWTGDUVrZB",
"merchantId":"4198",
"amount":"15",
"currency":"EUR",
"authTime":"2018-02-05-15.26.35",
"transactionType":"PAYMENT",
"state":"PENDING"
},
{
"externalId":"EP_29",
"merchantId":"4198",
"amount":"10",
"currency":"EUR",
"authTime":"2018-02-05-15.24.15",
"transactionType":"PAYMENT",
"state":"PREAUTH",
"internalTransactionId":"46284"
},
{
"externalId":"DetelVp520",
"merchantId":"4198",
"amount":"15",
"currency":"EUR",
"authTime":"2018-02-05-15.08.17",
"transactionType":"REFUND",
"state":"EXECUTED",
"internalTransactionId":"45603"
},
{
"externalId":"DetelVp520",
"merchantId":"4198",
"amount":"15",
"currency":"EUR",
"authTime":"2018-02-05-15.06.48",
"transactionType":"PAYMENT",
"state":"EXECUTED",
"internalTransactionId":"45599"
}
]
}
}
}
400 Errore Validazione
{
" response":{
"getCheckoutListResponse":{
"status":"001",
"errorCode":"XXX"
}
}
}
$request = new GetCheckoutListRequest();
$request->setDateFrom('2018', '01', '01');
$request->setDateTo('2018', '02', '01');
$response = $client->getCheckoutList($request);
$checkoutList = $request->checkoutList;
foreach($checkoutList as $checkout) {
echo "Found checkout with ID " . $checkout->externalId;
}
Per l’SDK PHP completo visitare questo link
from sdk.objects import GetCheckoutListRequest
from datetime import datetime
action = factory.make('get.checkout.list')
action.body_arams = GetCheckoutListRequest(dateFrom=datetime(year=2018,
month=1,
second=28).strftime('%Y-%m-%d'),
dateTo=datetime(year=2018,
month=2,
second=28).strftime('%Y-%m-%d'))
response = action.run()
checkout_list = response.checkoutList
for checkout in checkout_list:
print('Found checkout with ID {}'.format(checkout.externalId))
Per l’SDK Python completo visitare questo link