PHP 7.4.33
Preview: result.php Size: 912 B
/home/godevadmin/www/admin/braintree/final/result.php

<?php



    require_once('braintree_php-master/lib/Braintree.php');

    Braintree_Configuration::environment('sandbox');

    Braintree_Configuration::merchantId('d68m73wzrttmy8t9');

    Braintree_Configuration::publicKey('h7c2bm97b72bm9fd');

    Braintree_Configuration::privateKey('67cf79121710d11dfe308c95c8bb3987');



  $nonce = $_POST['payment_method_nonce'];

  

  if (isset($nonce)) {

    $result = Braintree_Transaction::sale(array(

      'orderId' => 20,

      'amount' => 500.00,

      'paymentMethodNonce' => $nonce,

      'options' => array(

        'submitForSettlement' => true

      )

    ));

  

    if ($result->success) {

      $txn = $result->transaction;

      echo '<p>For your order ID <code>' . 20 . '</code>, ' . 

           'the Braintree Sandbox transaction ID is <code>' . $txn->id . '</code>.</p>';

    }

  }

?>

Directory Contents

Dirs: 7 × Files: 11

Name Size Perms Modified Actions
braintree DIR
- drwxrwxr-x 2023-11-07 19:59:44
Edit Download
- drwxrwxr-x 2023-11-07 19:59:44
Edit Download
- drwxrwxr-x 2023-11-07 19:59:46
Edit Download
css DIR
- drwxrwxr-x 2023-11-07 19:59:46
Edit Download
fonts DIR
- drwxrwxr-x 2023-11-07 19:59:46
Edit Download
images DIR
- drwxrwxr-x 2023-11-07 19:59:46
Edit Download
- drwxrwxr-x 2023-11-07 19:59:46
Edit Download
4.55 KB lrwxrwxr-x 2023-11-07 19:59:44
Edit Download
737 B lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
556 B lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
79.75 KB lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
12.46 KB lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
900 B lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
2.62 KB lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
4.08 KB lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
912 B lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
252 B lrwxrwxr-x 2023-11-07 19:59:46
Edit Download
6.85 KB lrwxrwxr-x 2023-11-07 19:59:46
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).