AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.217.103
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/www/lrsys_projetos/sopizzas/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/www/lrsys_projetos/sopizzas/application/controllers/braintree.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Braintree extends CI_Controller
{
    function __construct() {
        parent::__construct();
        $this->load->library("braintree_lib");
    }

	private function printJSON($var) {
		echo json_encode($var);
	}

    public function get_token() {
        $token = $this->braintree_lib->create_client_token();
        $this->printJSON($token);
    }

    public function tryPayment1($value='') {
        $result = Braintree_Transaction::sale([
            'amount' => '1000.00',
            'paymentMethodNonce' => 'cc',
            'options' => [ 'submitForSettlement' => true ]
        ]);

        if ($result->success) {
            print_r("success!: " . $result->transaction->id);
        } else if ($result->transaction) {
            print_r("Error processing transaction:");
            print_r("\n  code: " . $result->transaction->processorResponseCode);
            print_r("\n  text: " . $result->transaction->processorResponseText);
        } else {
            print_r("Validation errors: \n");
            print_r($result->errors->deepAll());
        }
    }

    public function tryPayment2($value='') {
        $customer = Braintree\Customer::createNoValidate([
            'creditCard' => [
                'number' => '5105105105105100',
                'expirationDate' => '05/12'
            ]
        ]);
        $creditCard = $customer->creditCards[0];
        $result = Braintree\CreditCard::sale($creditCard->token, [
            'amount' => '100.00'
        ]);
        $this->braintree_lib->assertTrue($result->success);
        $this->braintree_lib->assertEquals('100.00', $result->transaction->amount);
        $this->braintree_lib->assertEquals($customer->id, $result->transaction->customerDetails->id);
        $this->braintree_lib->assertEquals($creditCard->token, $result->transaction->creditCardDetails->token);
    }

    public function tryPayment3($value='') {
        $result = Braintree_Transaction::sale(array(
                        'amount' => '50',
                            'creditCard' => array(
                            'number' => '4111111111111111',
                            'cardholderName' => '',
                            'expirationDate' => '12/18',
                            'cvv' => '132'
                        )
                    ));
        if ($result->success && $result->transaction->id) {
            $braintreeCode=$result->transaction->id;
            echo $braintreeCode;
        }
        else if ($result->transaction) {
            echo 'no transaction id';
        }
        else 
        {
            echo 'failed';
        }
    }

    public function tryPayment4($value='') {
        $merchantAccountParams = [
                                  'individual' => [
                                    'firstName' => 'Arka',
                                    'lastName' => 'Majumder',
                                    'email' => 'earthtechnology7@gmail.com',
                                    'phone' => '9007398692',
                                    'dateOfBirth' => '1993-04-13',
                                    'ssn' => '',
                                    'address' => [
                                      'streetAddress' => '111 Main St',
                                      'locality' => 'Chicago',
                                      'region' => 'IL',
                                      'postalCode' => '60622'
                                    ]
                                  ],
                                  'funding' => [
                                    'descriptor' => 'Samrat Ladders',
                                    'destination' => Braintree_MerchantAccount::FUNDING_DESTINATION_BANK,
                                    'email' => 'earthtechnology12@gmail.com',
                                    'mobilePhone' => '9933535438',
                                    'accountNumber' => '1123581321',
                                    'routingNumber' => '071101307'
                                  ],
                                  'tosAccepted' => true,
                                  'masterMerchantAccountId' => "earthtechnologypvtltd"
                                ];
        $result = Braintree_MerchantAccount::create($merchantAccountParams);
        // $result = Braintree_Transaction::sale([
        //                 'merchantAccountId' => 'arka_majumder_instant_8p33vzc8',
        //                 'amount' => '10.00',
        //                 'paymentMethodNonce' => nonceFromTheClient,
        //                 'serviceFeeAmount' => "1.00" //this amt will be transfered to main merchnat 
        //             ]);
        $result->success;
        // true
        echo $result->merchantAccount->status;
        echo '<br>';
        // "pending"
        echo $result->merchantAccount->id;
        echo '<br>';
        // "blue_ladders_store"
        echo $result->merchantAccount->masterMerchantAccount->id;
        echo '<br>';
        // "14ladders_marketplace"
        echo $result->merchantAccount->masterMerchantAccount->status;
        echo '<br>';
        // "active"
        echo "<pre>";
        print_r($result);
        echo "</pre>";
    }

}
?>

Anon7 - 2022
AnonSec Team