Direct Payment
Retrieve a specific data resource
POST
Credit/Debit cards, Apple Pay, Google Pay and PayPal payments only support PARTIAL capture type.
Try running the API in supported devices and browsers
Your browser does not support Apple Pay on the web. To try this demo, open this page in Safari. (See Requirements.)
****
Ready to Send Request
Fill in the request parameters and click "Send Request" to see the API response here
Waiting for request
Processing Request
Please wait while we fetch the response...
Copy the below code and run in your putty/terminal
Before executing the code, replace ###YOUR_WEBHOOK_URL### with your original webhook URL
PHP
<?php
// Need to enter your payment access key value here
$payment_access_key = '###YOUR_PAYMENT_ACCESS_KEY###';
// Now, have to encode the $payment_access_key value with the base64 encode
$encoded_data = base64_encode($payment_access_key);
// Action Endpoint
$endpoint = 'https://payport.novalnet.de/v2/transaction/details';
// Build the Headers array
$headers = [
// The Content-Type should be "application/json"
'Content-Type:application/json',
// The charset should be "utf-8"
'Charset:utf-8',
// Optional
'Accept:application/json',
// The formed authenticate value (case-sensitive)
'X-NN-Access-Key:' . $encoded_data,
];
$data = [];
// Build Merchant Data
$data['transaction'] = [
// The TID for which you need to get the details
'tid' => '###NOVALNET_TID###',
];
// Custom Data
$data['custom'] = [
// Merchant's selected language
'lang' => 'EN',
];
// Convert the array to JSON string
$json_data = json_encode($data);
// Handle Response
$response = send_request($json_data, $endpoint, $headers);
function send_request($data, $url, $headers) {
// Initiate cURL
$curl = curl_init();
// Set the url
curl_setopt($curl, CURLOPT_URL, $url);
// Set the result output to be a string
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// Set the POST value to true (mandatory)
curl_setopt($curl, CURLOPT_POST, true);
// Set the post fields
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
// Set the headers
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
// Execute cURL
$result = curl_exec($curl);
// Handle cURL error
if (curl_errno($curl)) {
echo 'Request Error:' . curl_error($curl);
return $result;
}
// Close cURL
curl_close($curl);
// Decode the JSON string
$result = json_decode($result);
return $result;
}
?>