KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/lecturebazaar.com/vendor/instamojo/instamojo-php/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/lecturebazaar.com/vendor/instamojo/instamojo-php/main.php
<?php

require_once __DIR__ . '/vendor/autoload.php';

    $instaobj = Instamojo\Instamojo::init('app',[
        "client_id" =>  $_ENV["CLIENT_ID"],
        "client_secret" => $_ENV["CLIENT_SECRET"]
       
    ],true);
 
    
    // $transaction_id = "TEST_".time();
    // var_dump([
    //     "name" => "XYZ",
    //     "email" => "xyz@squareboat.com",
    //     "phone" => "9999999988",
    //     "amount" => 200,
    //     "transaction_id" => $transaction_id,
    //     "currency" => "INR"
    // ]);

    $payment_request = $instaobj->createPaymentRequest([
        'amount'=>10,
        'purpose'=>"Test script"
        ]);
        var_dump($payment_request['id']);
        try{
    $gateway_order = $instaobj->createGatewayOrderForPaymentRequest(
        "292e38e570794fa592ccf74cc84c8fda",
        [
        "name" => "XYZ",
        "email" => "xyz@squareboat.com",
        "phone" => "9999999988",
        // "amount" => 200,
        // "transaction_id" => $transaction_id,
        // "currency" => "INR"
    ]);
        
    var_dump(json_encode($gateway_order));
    }catch(Exception $e){
            print('Error: ' . $e->getMessage());
        }

?>

Anon7 - 2021