PHP code example of mantraideas / laravel-connectips
1. Go to this page and download the library: Download mantraideas/laravel-connectips 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/ */
$connectips = new \Mantraideas\LaravelConnectips\LaravelConnectips();
$transactionId = request()->query('TXNID'); // Replace with the actual transaction ID
$transactionAmount = \App\Models\Payment::where('transaction_id',$transactionId)->first()?->amount; // Replace with the actual transaction amount
$paymentValidation = $connectips->validatePayment($transactionId,$transactionAmount);
$connectips = new \Mantraideas\LaravelConnectips\LaravelConnectips();
$transactionId = request()->query('TXNID'); // Replace with the actual transaction ID
$transactionAmount = \App\Models\Payment::where('transaction_id',$transactionId)->first()?->amount; // Replace with the actual transaction amount
$transactionDetails = $connectips->getTransactionDetails($transactionId);