File manager - Edit - /home/asiatechinc/public_html/bhrhotelsindia.com/vendor/payrexx/payrexx/examples/AuthTokenCreate.php
Back
<?php spl_autoload_register(function($class) { $root = dirname(__DIR__); $classFile = $root . '/lib/' . str_replace('\\', '/', $class) . '.php'; if (file_exists($classFile)) { require_once $classFile; } }); // $instanceName is a part of the url where you access your payrexx installation. // https://{$instanceName}.payrexx.com $instanceName = 'YOUR_INSTANCE_NAME'; // $secret is the payrexx secret for the communication between the applications // if you think someone got your secret, just regenerate it in the payrexx administration $secret = 'YOUR_SECRET'; $payrexx = new \Payrexx\Payrexx($instanceName, $secret); // init empty request object $authToken = new \Payrexx\Models\Request\AuthToken(); // info for auth token (user id) $authToken->setUserId(1); // fire request with created and filled link request-object. try { $response = $payrexx->create($authToken); var_dump($response); } catch (\Payrexx\PayrexxException $e) { print $e->getMessage(); }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings