class VerifyPurchase
{
protected $provider = "https://verify.bcstatic.com/api-provider";
protected $product = "monster-tools";
protected $key_path;
public function __construct()
{
goto Db489;
cbc78:
e2ff4:
goto F71ff;
Ebdc6:
abort(401, "Something went wrong, please contact support.");
goto cbc78;
Db489:
if (isset($this->provider)) {
goto e2ff4;
}
goto Ebdc6;
F71ff:
$this->key_path = storage_path("app/." . $this->product);
goto feafe;
feafe:
}
public function satisfied()
{
return app(ArtisanApi::class)->hasRegistered();
}
public function authorize()
{
goto acea3;
acea3:
$authorized = Request::input("authorized");
goto A30a3;
Dce0b:
if ($authorized === "success" && $authorized_key) {
goto a360d;
}
goto b787a;
f65f7:
$authorized_key = Request::input("authorized_key", null);
goto Dce0b;
A30a3:
$message = Request::input("message");
goto f65f7;
b787a:
return redirect("/install/verify")->withErrors($message);
goto c87b1;
Bf417:
a360d:
goto e45c0;
c87b1:
goto c65c1;
goto Bf417;
D9f92:
c65c1:
goto Ae6f6;
e45c0:
return $this->generate_key($authorized_key, $message);
goto D9f92;
Ae6f6:
}
public function login()
{
$redirect = $this->provider . "?item=" . $this->product . "&return_uri=" . urlencode(URL::route("verify.return"));
return Redirect::away($redirect);
}
protected function generate_key($code, $message)
{
goto fe39f;
d4aa8:
Storage::disk("local")->put($filename, artisanCrypt()->encrypt($code));
goto Ef92a;
C2f9a:
$filename = . $this->product;
goto bec35;
Ef92a:
D3bda:
goto D8abb;
D8abb:
return redirect("/install/verify")->withSuccess($message);
goto c7db9;
fe39f:
if ($this->satisfied()) {
goto D3bda;
}
goto C2f9a;
bec35:
Session::put("purchase_code", $code);
goto d4aa8;
c7db9:
}
}
© 2023 Quttera Ltd. All rights reserved.