1. Go to this page and download the library: Download solinor/paymenthighwayio library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$transactionId = "f23a9be0-15fe-43df-98ac-92f6a5731c3b"; // get sph-transaction-id as a GET parameter
$amount = 1999;
$currency = "EUR";
$response = $paymentApi->commitFormTransaction($transactionId, $amount, $currency ); //response is pure json run through json_decode();
$token = new \Solinor\PaymentHighway\Model\Token( $tokenId );
$transaction = new \Solinor\PaymentHighway\Model\Request\Transaction( $token, $amount, $currency );
$response = $paymentApi->debitTransaction( $transactionId, $transaction);
$token = new \Solinor\PaymentHighway\Model\Token( $tokenId );
$strongCustomerAuthentication = new \Solinor\PaymentHighway\Model\Sca\StrongCustomerAuthentication(
new \Solinor\PaymentHighway\Model\Sca\ReturnUrls(
"https://example.com/success", // URL the user is redirected after succesful 3D-Secure authentication if strong customer authentication is urchase to help in transaction risk analysis (TRA)
);
$transaction = new \Solinor\PaymentHighway\Model\Request\CustomerInitiatedTransaction( $token, $amount, $currency, $strongCustomerAuthentication );
$response = $paymentApi->chargeCustomerInitiatedTransaction( $transactionId, $transaction);
$token = new \Solinor\PaymentHighway\Model\Token( $tokenId );
$transaction = new \Solinor\PaymentHighway\Model\Request\Transaction( $token, $amount, $currency );
$response = $paymentApi->chargeMerchantInitiatedTransaction( $transactionId, $transaction);