Skip to content

Commit

Permalink
rave webhook & tranx
Browse files Browse the repository at this point in the history
  • Loading branch information
afsunday committed Nov 12, 2020
1 parent 1348833 commit c728464
Show file tree
Hide file tree
Showing 7 changed files with 414 additions and 118 deletions.
27 changes: 27 additions & 0 deletions src/Processors/Flutterwave/Flutterwave.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ class Flutterwave extends Processor
'payments' => 'v3'
];

/**
* Flutterwave supported currencies
*/
protected $currencies = [
'NGN', 'GHS', 'RND', 'USD'
];

/**
* Curl request
*
Expand All @@ -39,13 +46,33 @@ public function __construct(string $secretKey)
$this->request->setHeaders( $this->getHeaders() );
}

/**
* set request with required headers
*
* @return void
*/
public function setHeaders(array $headers): void
{
$this->headers = $headers;
}

/**
* set reponse object
*
* @return void
*/
public function setResponse(object $response): void
{
$this->response = $response;
}

/**
* Set the default currency
*
* @since 0.5
*/
public function getCurrencies(): array
{
return $currencies;
}
}
Loading

0 comments on commit c728464

Please sign in to comment.