Skip to content

Commit

Permalink
add PayTabs
Browse files Browse the repository at this point in the history
  • Loading branch information
NafezlyDotCom committed Oct 2, 2022
1 parent 28fa20e commit 5704624
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Classes/PayPalPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ public function pay($amount = null, $user_id = null, $user_first_name = null, $u
*/
public function verify(Request $request): array
{
$environment = new SandboxEnvironment($this->paypal_client_id, $this->paypal_secret);

if($this->paypal_mode=="live")
$environment = new ProductionEnvironment($this->paypal_client_id, $this->paypal_secret);
else
$environment = new SandboxEnvironment($this->paypal_client_id, $this->paypal_secret);

$client = new PayPalHttpClient($environment);

try {
Expand Down

0 comments on commit 5704624

Please sign in to comment.