⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.74
Server IP:
13.127.59.50
Server:
Linux ip-172-31-46-210 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.3-4ubuntu2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
ubuntu
/
vendor
/
mercadopago
/
dx-php
/
tests
/
View File Name :
FakeApiHub.php
<?php namespace MercadoPago; class FakeApiHub { private $_files = [ '/oauth/token' => 'authorization.json', '/v1/payment_methods' => 'payment_methods.json', '/v1/payments' => 'payment.json', '/dummies' => 'dummies.json', '/v1/dummies/search' => 'customer_search.json', '/dummy/:id' => 'dummy.json' ]; public function getJson($method, $endPoint) { switch ($method) { case 'GET': { return $this->getFile($endPoint); break; } case 'POST': { return $this->getFile($endPoint); break; } default: return ''; } } private function getFile($endpoint) { return file_get_contents(dirname(__FILE__) . '/json_files/' . $this->_files[$endpoint]); } }