pixiGetCreditCardInfo
Returns the credit card data and the credit card processor authorization ID stored for an order.
Looks up the order with the given OrderNr in OrderHeader and joins its address record (OrderHeader.AddrRef = Addresses.AddrKey). The credit card fields are read from that address record.
The returned row contains:
- the card type text, resolved from
Creditcards.CardTextviaAddresses.ACardType - card holder, card number, expiry date and CVC
- the authorization ID of the credit card processor (
OrderHeader.ccpPayID) - the flag
CCPIDUsedBefore. It is1if another order of the same customer (CustRef) with a lower order number already has the sameccpPayID, otherwise0.
If no order with this number exists, or the order has no matching address record, the result set is empty.
Notes
- All tables are read with
NOLOCK, so uncommitted data may be returned. - The call returns sensitive payment data (full card number and CVC) exactly as stored. Access to this call should be restricted.
- If
ccpPayIDisNULL, the comparison with earlier orders never matches andCCPIDUsedBeforeis0. - The card type is resolved with a scalar subquery. If
Creditcardscontains more than one row for the sameCardType, SQL Server raises an error (subquery returned more than one value). If there is no matching row,CreditCardTypeisNULL. - The column data types depend on the table definitions, which are not part of the code.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderNr
Required
|
int | – |
Order number ( Example: |
Result set 1 · Always; empty if no order with the given number and a matching address record exists.
Credit card data of the order.
| Column | Type | Description |
|---|---|---|
OrderNr
|
int |
Order number. |
CreditCardType
Nullable |
string |
Display text of the card type from |
CreditCardHolder
Nullable |
string |
Card holder name ( |
CreditCardNumber
Nullable |
string |
Card number as stored ( |
CreditCardExpiry
Nullable |
string |
Expiry date of the card ( |
CVC
Nullable |
string |
Card verification code ( |
CCPAuthorizationID
Nullable |
string |
Authorization/payment ID of the credit card processor ( |
CCPIDUsedBefore
|
int |
|
Response example
<SqlRowSet1>
<row>
<OrderNr>100245</OrderNr>
<CreditCardType>VISA</CreditCardType>
<CreditCardHolder>Max Mustermann</CreditCardHolder>
<CreditCardNumber>4111111111111111</CreditCardNumber>
<CreditCardExpiry>12/27</CreditCardExpiry>
<CVC>123</CVC>
<CCPAuthorizationID>TX-8F3A21C9</CCPAuthorizationID>
<CCPIDUsedBefore>0</CCPIDUsedBefore>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetCreditCardInfo>
<OrderNr>100245</OrderNr>
</ns1:pixiGetCreditCardInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetCreditCardInfo>
<OrderNr>100245</OrderNr>
</ns1:pixiGetCreditCardInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
'OrderNr' => '100245',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetCreditCardInfo', $soapArguments);
- SQL object:
- dbo.pipiGetCreditCardInfo