Skip to content

Commit

Permalink
tred ths for charge me
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnsai committed Feb 13, 2024
1 parent 68cf012 commit cd45c20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/HostedPayments/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Checkout
private string $webhookUrl;
private string $returnUrl;
private bool $autoReturn;
private bool $chargeMe;

public function __construct(
string $publicKey,
Expand All @@ -40,6 +41,7 @@ public function __construct(
string $webhookUrl = '',
string $returnUrl = '',
bool $autoReturn = false,
bool $chargeMe = false
) {
$this->publicKey = $publicKey;
$this->transactionName = $transactionName;
Expand All @@ -58,6 +60,7 @@ public function __construct(
$this->webhookUrl = $webhookUrl;
$this->returnUrl = $returnUrl;
$this->autoReturn = $autoReturn;
$this->chargeMe = $chargeMe;
}

public function createCheckoutLink(): string
Expand All @@ -80,6 +83,7 @@ public function createCheckoutLink(): string
"webhookUrl" => $this->webhookUrl,
"returnUrl" => $this->returnUrl,
"autoReturn" => $this->autoReturn,
"chargeMe" => $this->chargeMe,
];

$ch = curl_init('https://checkout.broadpay.io/gateway/api/v1/checkout');
Expand Down

0 comments on commit cd45c20

Please sign in to comment.