Skip to content

Commit

Permalink
fix authorization param and update Readme.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
chadrackkanza committed Sep 7, 2023
1 parent a1a2d8c commit 184a72a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $response = Flexpay::c2b(
'243XXXXXXXXX', //phoneNumber
'1500', //amount
'cdf', //currency
'www.flexpay.cd', //callbackUrl
'https://mon-site.com', //callbackUrl
1 //commission
);
dd($response);
Expand All @@ -66,7 +66,7 @@ $response = Flexpay::b2c(
'243XXXXXXXXX', //phoneNumber
'1500', //amount
'cdf', //currency
'www.flexpay.cd', //callbackUrl
'https://mon-site.com', //callbackUrl
1 //commission
);
dd($response);
Expand All @@ -80,6 +80,24 @@ $response = Flexpay::checkTransaction('YOUR_ORDER_NUMBER');
dd($response);
```

Payment ( e-money, qr-code and card)

```php
use chadrackkanza\Flexpay\Facades\Flexpay;
$response = Flexpay::payment(
"TEST0014521", // reference
"Tests de paiement", // description
10, // amount
"USD", // currency
"https://mon-site.com/callback.com", // callback_url
"https://mon-site.com/approve.com", //approve_url
"https://mon-site.com/cancel.com", // cancel_url
"https://mon-site.com/decline.com" // decline_url
"https://mon-site.com" // home_url
);
dd($response);
```

## Credits

- [Chadrack KANZA](https://github.com/chadrackkanza)
Expand Down
3 changes: 2 additions & 1 deletion src/Flexpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ public function b2c(string $phoneNumber, float $amount, string $currency, string
return $result;
}

public function cardPayment(string $reference , string $description , float $amount, string $currency,
public function payment(string $reference , string $description , float $amount, string $currency,
string $callbackUrl, string $approveUrl, string $cancelUrl, string $declineUrl,string $homeUrl )
{
$result = $this->init(
$this->URL_CARD,
[
"authorization" => $this->TOKEN,
"merchant" => $this->MERCHANT,
"reference" => $reference ,
"description" => $description ,
Expand Down

0 comments on commit 184a72a

Please sign in to comment.