REDROOM
PHP 7.4.33
Path:
Logout
Edit File
Size: 957 B
Close
/home/godevadmin/www/admin/braintree/final/braintree2/tests/Braintree/OAuthTestHelper.php
Text
Base64
<?php namespace Test\Braintree; use Braintree; class OAuthTestHelper { public static function createGrant($gateway, $params) { $http = new Braintree\Http($gateway->config); $http->useClientCredentials(); $response = $http->post('/oauth_testing/grants', ['grant' => $params]); return $response['grant']['code']; } public static function createCredentials($params) { $gateway = new Braintree\Gateway([ 'clientId' => $params['clientId'], 'clientSecret' => $params['clientSecret'] ]); $code = OAuthTestHelper::createGrant($gateway, [ 'merchant_public_id' => $params['merchantId'], 'scope' => 'read_write' ]); $credentials = $gateway->oauth()->createTokenFromCode([ 'code' => $code, 'scope' => 'read_write', ]); return $credentials; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
CreditCardNumbers
DIR
-
drwxrwxr-x
2023-11-07 19:59:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CreditCardDefaults.php
150 B
lrwxrwxr-x
2023-11-07 19:59:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OAuthTestHelper.php
957 B
lrwxrwxr-x
2023-11-07 19:59:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).