pixiSetCreditCardInfo
Masks the stored credit card number and CVC of an order's address and/or stores a payment authorization code on the order.
Updates credit card related data for the order identified by OrderNr. Two independent steps run, depending on the parameters:
- Scrambling (if
ScrambleData= 1, the default): the address referenced by the order (OrderHeader.AddrRef) is looked up. If its card numberACardNrdoes not already contain****, it is replaced by*************followed by the last four characters of the original number, and the card verification codeCCCVCis set to***. - Authorization code (if
AuthCodeis not NULL): the value is written toOrderHeader.ccpPayIDof the order.
Both steps can be combined in one call. The procedure returns no result set. It only sets a return code: 0 if at least one row was updated, otherwise 1.
Notes
- The return code (
0/1) is a T-SQLRETURNvalue and is not delivered as a row; SOAP clients usually cannot see it. There is no explicit error for an unknownOrderNr– nothing is updated in that case. - The masking affects the address record itself. If the same address is referenced by other orders or the customer, the card data is masked for all of them.
- Addresses whose
ACardNris NULL are not masked (theNOT LIKEcheck is not true for NULL). Already masked numbers (containing****) are skipped, so repeated calls are safe. - The order lookup uses
NOLOCK; updates useROWLOCK. No explicit transaction is used, so the two steps are not atomic. - To only store an authorization code without masking, pass
ScrambleData= 0. - The helper
util.TempTableDropis called to drop the temporary table; its definition is not attached.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderNr
Required
|
int | – |
Number of the order ( Example: |
ScrambleData
|
bit boolean |
1 |
Whether the card number and CVC of the order's address are masked. Allowed values
Example: |
AuthCode
|
varchar(50) string |
NULL |
Payment authorization code / payment ID stored in Example: |
This call returns no result set.
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:pixiSetCreditCardInfo>
<OrderNr>104523</OrderNr>
<!-- <ScrambleData>1</ScrambleData> -->
<!-- <AuthCode>AUTH-7F3K92</AuthCode> -->
</ns1:pixiSetCreditCardInfo>
</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:pixiSetCreditCardInfo>
<OrderNr>104523</OrderNr>
<!-- <ScrambleData>1</ScrambleData> -->
<!-- <AuthCode>AUTH-7F3K92</AuthCode> -->
</ns1:pixiSetCreditCardInfo>
</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' => '104523',
// 'ScrambleData' => '1',
// 'AuthCode' => 'AUTH-7F3K92',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiSetCreditCardInfo', $soapArguments);
- SQL object:
- dbo.pipiSetCreditCardInfo