composer require hakhant/payments
use Hak\Payments\Facades\Gateway;
$gateway = Gateway::create('2c2p');
$paymentUrl = $gateway->createPayment(
int $amount,
string $invoiceNo,
string $currencyCode,
string $nonceStr, // Nonce random string
string $frontendReturnUrl,
string $backendReturnUrl,
string $paymentDescription,
array $userDefined = []
);
// will return redirect payment url
// Example Output: "https://sandbox-pgw-ui.2c2p.com/payment/4.3/#/token/kSAops9Zwhos8hSTSeLTUfpHWx5Z92B%2bH%2boP1feNEaIJJzV7xpt1Zj8xSRgE%3d"
php artisan vendor:publish --provider="Hak\Payments\GatewayServiceProvider" --tag="gateway"
- MERCHANT_ID // JT02
- SECRET_KEY // SHA256 key
- CURRENCY_CODE // MMK