This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Mail\Events\MessageSending; | |
use Illuminate\Support\Facades\Event; | |
class AppServiceProvider extends ServiceProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clean_number($phone_number){ | |
$phone_number = preg_replace('/^0/','234',$phone_number); | |
$phone_number = preg_replace('/^\+/','',$phone_number); | |
return $phone_number; | |
} | |
// This should convert a number like 09023293092 or +2349023293092 to 2349023293092 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Reads the variables sent via POST from our gateway | |
$sessionId = $_POST["sessionId"]; | |
$serviceCode = $_POST["serviceCode"]; | |
$phoneNumber = $_POST["phoneNumber"]; | |
$text = $_POST["text"]; | |
if ( $text == "" ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(-1); | |
ini_set('display_errors', 1); | |
define('SK', ''); | |
/// List banks | |
function list_banks(){ | |
$banks = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = new RestClient("https://api.paystack.co/transaction/initialize"); | |
var request = new RestRequest(Method.POST); | |
request.AddHeader("content-type", "application/x-www-form-urlencoded"); | |
request.AddHeader("authorization", "Bearer SECRET_KEY"); | |
request.AddParameter("application/x-www-form-urlencoded", "[email protected]&amount=10000", ParameterType.RequestBody); | |
IRestResponse response = client.Execute(request); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"ssl" => array( | |
"verify_peer" => false, | |
"verify_peer_name" => false, | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"ssl" => array( | |
"verify_peer" => false, | |
"verify_peer_name" => false, | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$code = '1212ujwq'; | |
header( 'HTTP/1.1 200 OK' ); | |
$opts = array( | |
'http'=>array( | |
'method'=>"GET", | |
'header'=>"Authorization: Bearer sk_test_877a9699bbc3cf8e42f2190f1b39e35e974d5e2d\r\n" | |
) | |
); | |
$context = stream_context_create($opts); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 4.4.15.5 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Jul 25, 2016 at 09:44 PM | |
-- Server version: 5.6.30 | |
-- PHP Version: 7.0.6 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |