1. Go to this page and download the library: Download salispay/paymentgateway 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/ */
salispay / paymentgateway example snippets
use SalisPay\SalisPayPaymentGateway;
use SalisPay\Resources\OrderAPI;
// Initialize the payment gateway
$clientId = 'your-client-id';
$clientSecret = 'your-client-secret';
$gateway = new SalisPayPaymentGateway($clientId, $clientSecret);
// Initialize the OrderAPI
$orderAPI = new OrderAPI($gateway);
try {
$orderId = 'your-order-id'; // Replace with an actual order ID
$statusResponse = $orderAPI->checkStatus($orderId);
echo "Order Status: " . $statusResponse;
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}
use CredoPay\CredoPayPaymentGateway;
use CredoPay\Resources\OrderAPI;
// Initialize the payment gateway
$clientId = 'your-client-id';
$clientSecret = 'your-client-secret';
$gateway = new CredoPayPaymentGateway($clientId, $clientSecret);
// Initialize the OrderAPI
$orderAPI = new OrderAPI($gateway);
try {
$orderId = 'your-order-id'; // Replace with an actual order ID
$statusResponse = $orderAPI->checkStatus($orderId);
echo "Order Status: " . $statusResponse;
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}
use CredoPay\CredoPayPaymentGateway;
use CredoPay\Resources\OrderAPI;
// Initialize the payment gateway
$clientId = 'your-client-id';
$clientSecret = 'your-client-secret';
$gateway = new CredoPayPaymentGateway($clientId, $clientSecret);
// Initialize the OrderAPI
$orderAPI = new OrderAPI($gateway);