index.php 700 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. require('../vendor/autoload.php');
  3. \Paystack\Paystack::init('sk_test_19f3325a5a0abe546b508cd5926f3d6223d4e4d8');
  4. try {
  5. // $customer = \Paystack\Customer::create([
  6. // 'email' => 'damiperfect@yahoo.com',
  7. // 'first_name' => 'Perfecto',
  8. // 'last_name' => 'Makanjuo',
  9. // 'phone' => '08064474572'
  10. // ]);
  11. //
  12. // echo 'Customer\'s first name is: '.$customer->first_name;
  13. // $payment = \Paystack\Transaction::initialize([
  14. // 'email' => 'damiperfect@gmail.com',
  15. // 'amount' => '3000'
  16. // ]);
  17. $transaction = \Paystack\Transaction::verify('3beczdakli');
  18. echo $transaction->amount;
  19. }
  20. catch(Exception $e)
  21. {
  22. echo $e->getMessage();
  23. }
  24. ?>