Skip to content

Instantly share code, notes, and snippets.

@weezqyd
Created January 24, 2019 06:16
Show Gist options
  • Save weezqyd/181f797971f42099694be489137be6b5 to your computer and use it in GitHub Desktop.
Save weezqyd/181f797971f42099694be489137be6b5 to your computer and use it in GitHub Desktop.
Gateway Test
<?php
/**
* Created by PhpStorm.
* User: leitato
* Date: 12/4/18
* Time: 4:33 PM
*/
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$config = new \Roamtech\Gateway\Native\NativeConfig(__DIR__.'/config/roamtechapi.php');
$cache = new \Roamtech\Gateway\Native\NativeCache($config);
//var_dump($config, $cache);
$core = new \Roamtech\Gateway\Engine\Core(new Client(['base_uri' => $config->get('roamtechapi.api_endpoint')]), $config, $cache);
$gateway = new \Roamtech\Gateway\Client($core);
$response = $gateway->sms()->sendBulkMessages([
['recipient' => '254729422001', 'message' => 'This is a test sms from SDK'],
//['recipient' => '254705744566', 'message' => 'This is a test sms from SDK',]
], ['from' => 'bonyeza']);
var_dump($response);
$response = $gateway->sms()->sendMessage('This is a test', ['254729422001'], ['from' => 'roamtech']);
//foreach ($response[''])
//$response = $gateway->airtime()->setRecipients([
// ['phoneNumber' => '254729422001', 'amount' => 5]
//])->purchase();
var_dump($response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment