manatolia
New member
- May 16, 2021
- 1
- -2
- 3
@NullMaster i try to search website, api and data variables but cannot find how to use webservice. Maybe the block can be about purchase code but i am not sure
FYI @Tomz
PHP:
public static function install()
{
// Remove the plugin entry
self::uninstall();
// Plugin data
$data = [
'id' => 5,
'name' => 'offlinepayment',
'display_name' => 'Offline Payment',
'description' => null,
'has_ccbox' => 0,
'is_compatible_api' => 1,
'lft' => 5,
'rgt' => 5,
'depth' => 1,
'active' => 1,
];
try {
// Create plugin data
$paymentMethod = PaymentMethod::create($data);
if (empty($paymentMethod)) {
return false;
}
} catch (\Exception $e) {
return false;
}
return true;
}
FYI @Tomz