Was ist Tokenisierung?
Tokenisierung ist der Prozess der Speicherung von Kartendaten und der Generierung eines Tokens, der zur Verarbeitung von Transaktionen mit den gespeicherten Kartendaten verwendet wird. Trust Payments speichert die Kartendaten auf einem sicheren PCI-konformen Server, so dass Händler und Partner keine sensiblen Kartennummern speichern müssen.
Technischer Überblick
Zahlung - Tokenisierung (Speicherung) von Kartendaten - Vom Karteninhaber initiierte Transaktion
#!/usr/bin/python
import securetrading
stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
auth = {
"accounttypedescription": "MOTO",
"baseamount": "1050",
"credentialsonfile": "1",
"currencyiso3a": "GBP",
"expirydate": "01/35",
"requesttypedescriptions": ["AUTH"],
"orderreference": "order123456",
"pan": "4111111111111111",
"securitycode": "123",
"sitereference": "{{site_reference}}"
}
strequest = securetrading.Request()
strequest.update(auth)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php
if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);
$configData = array(
'username' => 'webservices@example.com',
'password' => 'Password1^',
);
$requestData = array(
'accounttypedescription' => 'MOTO',
'baseamount' => '1050',
'credentialsonfile' => '1',
'currencyiso3a' => 'GBP',
'expirydate' => '01/35',
'requesttypedescriptions' => array('AUTH'),
'orderreference' => 'order123456',
'pan' => '4111111111111111',
'securitycode' => '123',
'sitereference' => '{{site_reference}}'
);
$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());
?>
curl --user webservices@example.com:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias":"webservices@example.com",
"version": "1.00",
"request": [{
"accounttypedescription": "MOTO",
"baseamount": "1050",
"credentialsonfile": "1",
"currencyiso3a": "GBP",
"expirydate": "01/35",
"requesttypedescriptions": ["AUTH"],
"orderreference": "order123456",
"pan": "4111111111111111",
"securitycode": "123",
"sitereference": "{{site_reference}}"
}]
}'
{
"alias":"{{wsapi_username}}",
"version":"1.00",
"request":[{
"accounttypedescription":"MOTO",
"baseamount":"1050",
"credentialsonfile":"1",
"currencyiso3a":"GBP",
"expirydate":"01/35",
"requesttypedescriptions":["AUTH"],
"orderreference":"order123456",
"pan":"4111111111111111",
"securitycode":"123",
"sitereference":"{{site_reference}}"
}]
}
<requestblock version="3.67">
<alias>{{wsapi_username}}</alias>
<request type="AUTH">
<billing>
<amount currencycode="GBP">1050</amount>
<payment>
<expirydate>01/35</expirydate>
<pan>4111111111111111</pan>
<securitycode>123</securitycode>
</payment>
</billing>
<merchant>
<orderreference>order123456</orderreference>
</merchant>
<operation>
<accounttypedescription>MOTO</accounttypedescription>
<credentialsonfile>1</credentialsonfile>
<sitereference>{{site_reference}}</sitereference>
</operation>
</request>
</requestblock>
Keine Zahlung - Tokenisierung (Speicherung) der Kartendaten - Vom Karteninhaber initiierte Transaktion
#!/usr/bin/python
import securetrading
stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
auth = {
"accounttypedescription": "MOTO",
"baseamount": "1050",
"credentialsonfile": "1",
"currencyiso3a": "GBP",
"expirydate": "01/35",
"orderreference": "order123456",
"pan": "4111111111111111",
"requesttypedescriptions": ["ACCOUNTCHECK"],
"securitycode": "123",
"sitereference": "{{site_reference}}"
}
strequest = securetrading.Request()
strequest.update(auth)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php
if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);
$configData = array(
'username' => 'webservices@example.com',
'password' => 'Password1^',
);
$requestData = array(
'accounttypedescription' => 'MOTO',
'baseamount' => '1050',
'credentialsonfile' => '1',
'currencyiso3a' => 'GBP',
'expirydate' => '01/35',
'orderreference' => 'order123456',
'pan' => '4111111111111111',
'requesttypedescriptions' => array('ACCOUNTCHECK'),
'securitycode' => '123',
'sitereference' => '{{site_reference}}'
);
$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());
?>
curl --user webservices@example.com:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias":"webservices@example.com",
"version": "1.00",
"request": [{
"accounttypedescription": "MOTO",
"baseamount": "1050",
"credentialsonfile": "1",
"currencyiso3a": "GBP",
"expirydate": "01/35",
"orderreference": "order123456",
"pan": "4111111111111111",
"requesttypedescriptions": ["ACCOUNTCHECK"],
"securitycode": "123",
"sitereference": "{{site_reference}}"
}]
}'
{
"alias":"{{wsapi_username}}",
"version":"1.00",
"request":[{
"accounttypedescription":"MOTO",
"baseamount":"1050",
"credentialsonfile":"1",
"currencyiso3a":"GBP",
"expirydate":"01/35",
"orderreference":"order123456",
"pan":"4111111111111111",
"requesttypedescriptions":["ACCOUNTCHECK"],
"securitycode":"123",
"sitereference":"{{site_reference}}"
}]
}
<requestblock version="3.67">
<alias>{{wsapi_username}}</alias>
<request type="ACCOUNTCHECK">
<billing>
<amount currencycode="GBP">1050</amount>
<payment>
<expirydate>01/35</expirydate>
<pan>4111111111111111</pan>
<securitycode>123</securitycode>
</payment>
</billing>
<merchant>
<orderreference>order123456</orderreference>
</merchant>
<operation>
<accounttypedescription>MOTO</accounttypedescription>
<credentialsonfile>1</credentialsonfile>
<sitereference>{{site_reference}}</sitereference>
</operation>
</request>
</requestblock>
Zahlung - Tokenisierte (gespeicherte) Kartendaten - vom Karteninhaber initiierte Transaktion
#!/usr/bin/python
import securetrading
stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
auth = {
"accounttypedescription": "MOTO",
"baseamount": "1050",
"credentialsonfile": "2",
"currencyiso3a": "GBP",
"orderreference": "order123456",
"parenttransactionreference": "INSERT_PARENT_TRANSACTION_REFERENCE",
"requesttypedescriptions": ["AUTH"],
"sitereference": "{{site_reference}}"
}
strequest = securetrading.Request()
strequest.update(auth)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php
if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);
$configData = array(
'username' => 'webservices@example.com',
'password' => 'Password1^',
);
$requestData = array(
'accounttypedescription' => 'MOTO',
'baseamount' => '1050',
'credentialsonfile' => '2',
'currencyiso3a' => 'GBP',
'orderreference' => 'order123456',
'parenttransactionreference' => 'INSERT_PARENT_TRANSACTION_REFERENCE',
'requesttypedescriptions' => array('AUTH'),
'sitereference' => '{{site_reference}}'
);
$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());
?>
curl --user webservices@example.com:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias":"webservices@example.com",
"version": "1.00",
"request": [{
"accounttypedescription": "MOTO",
"baseamount": "1050",
"credentialsonfile": "2",
"currencyiso3a": "GBP",
"orderreference": "order123456",
"parenttransactionreference": "INSERT_PARENT_TRANSACTION_REFERENCE",
"requesttypedescriptions": ["AUTH"],
"sitereference": "{{site_reference}}"
}]
}'
{
"alias":"{{wsapi_username}}",
"version":"1.00",
"request":[{
"accounttypedescription":"MOTO",
"baseamount":"1050",
"credentialsonfile":"2",
"currencyiso3a":"GBP",
"orderreference":"order123456",
"parenttransactionreference":"INSERT_PARENT_TRANSACTION_REFERENCE",
"requesttypedescriptions":["AUTH"],
"sitereference":"{{site_reference}}"
}]
}
<requestblock version="3.67">
<alias>{{wsapi_username}}</alias>
<request type="AUTH">
<merchant>
<orderreference>order123456</orderreference>
</merchant>
<operation>
<accounttypedescription>MOTO</accounttypedescription>
<credentialsonfile>2</credentialsonfile>
<parenttransactionreference>INSERT_PARENT_TRANSACTION_REFERENCE</parenttransactionreference>
<sitereference>{{site_reference}}</sitereference>
</operation>
</request>
</requestblock>
Ähnliche Artikel
Was ist Tokenisierung?
Erfahren Sie mehr über die Speicherung von Kartendaten zur Verwendung bei zukünftigen Transaktionen.
Wiederkehrende Zahlungen
Spätere wiederkehrende Zahlungen mit den tokenisierten Kartendaten können über unsere Webservices API verarbeitet werden.
Vom Händler initiierte Transaktionen (MIT)
Übermittlung von Ad-hoc-Anfragen zur Verarbeitung einer Transaktion anhand zuvor gespeicherter Kartendaten ohne Interaktion des Karteninhabers.