Skip to content

Commit

Permalink
flutterwave bank & identity
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyikwuje committed Feb 20, 2021
1 parent 2eb4af7 commit 9fb4d62
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 618 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"type": "library",
"authors": [
{
"name": "ProcessWith API Team",
"email": "hello@Processwith.com"
"name": "ProcessWith Wallet Team",
"email": "hello@processwith.com"
}
],
"require": {
Expand All @@ -27,12 +27,12 @@
},
"autoload": {
"psr-4": {
"Paywith\\": "src"
"PayWith\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Paywith\\Tests\\": "tests"
"PayWith\\Tests\\": "tests"
}
},
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions play/index.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
use ProcessWith\ProcessWith;
use PayWith\PayWith;

require '../vendor/autoload.php';
require 'config.php';

$processwith = new ProcessWith('paystack');
$processwith->setSecretKey( PSTK_SECRET_KEY );
$paywith = new PayWith('paystack');
$paywith->setSecretKey( PSTK_SECRET_KEY );

$transaction = $processwith->transaction();
$transaction = $paywith->transaction();
$transaction->initialize([
'amount' => 1000,
'email' => 'ikwuje@gmail.com',
Expand Down
17 changes: 8 additions & 9 deletions src/Paywith.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?php

namespace Paywith;
namespace PayWith;

use Curl\Curl;
use Paywith\Processors\Flutterwave;
use Paywith\Processors\Paystack;
use Paywith\Helpers\DoSomething;
use Paywith\Exceptions\PayException;
use PayWith\Processors\Flutterwave;
use PayWith\Processors\Paystack;
use PayWith\Helpers\DoSomething;
use PayWith\Exceptions\PayException;

/**
* The Paywith class
* The PayWith class
*
* @author PayWith
* @link https://www.Paywith.com
* @link https://www.PayWith.com
* @version 0.5
*/
class PayWith
Expand Down Expand Up @@ -97,7 +96,7 @@ public function transaction(): ?object
$transaction = new Flutterwave\Transaction($this->secretKey);
break;
default:
//$transaction = new Paywith\transaction($this->secretKey);
//$transaction = new PayWith\transaction($this->secretKey);
}

return $transaction;
Expand Down
30 changes: 30 additions & 0 deletions src/Processors/Flutterwave/Banks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php declare(strict_types=1);

namespace PayWith\Processors\Flutterwave;

use PayWith\Helpers\DoSomething;
use PayWith\Exceptions\PayException;
use PayWith\Processors\Flutterwave\Flutterwave;

class Banks extends Flutterwave
{
/**
* Fetch list of available banks
*
* @since 0.6
*/
public function list(): array
{

}

/**
* Get a bank info
*
* @since 0.6
*/
public function get(): array
{

}
}
4 changes: 2 additions & 2 deletions src/Processors/Flutterwave/Flutterwave.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php declare(strict_types=1);

namespace Paywith\Processors\Flutterwave;
namespace PayWith\Processors\Flutterwave;

use Curl\Curl;
use Paywith\Processors\Processor;
use PayWith\Processors\Processor;

class Flutterwave extends Processor
{
Expand Down
52 changes: 52 additions & 0 deletions src/Processors/Flutterwave/Identity.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php declare(strict_types=1);

namespace PayWith\Processors\Flutterwave;

use PayWith\Helpers\DoSomething;
use PayWith\Exceptions\PayException;
use PayWith\Processors\Flutterwave\Flutterwave;

/**
* Identity Flutterwave wrapper
*
* @since 0.6
*/
class Identity extends Flutterwave
{
/**
* Curl request
*
* @var Curl
*/
protected $request;

/**
* Constructor
*
* @since 0.5
*/
public function __construct(string $secretKey)
{
parent::__construct($secretKey);
}

/**
* Get the customer info from BVN
*
* @since 0.6
*/
public static function bvnResolve(): array
{

}

/**
* Match a customer info with that of their BVN
*
* @since 0.6
*/
public static function bvnMatch( array $customer_info ): bool
{

}
}
Loading

0 comments on commit 9fb4d62

Please sign in to comment.