Hello I am trying to make a Direct Card Charge via the PHP SDK but getting Error: Undefined constant Flutterwave\Helper\Config::BASE_URL in /Users/andre/Desktop/Workspace/saas-manager/vendor/flutterwavedev/flutterwave-v3/src/Service/Transactions.php:34
When I passed a custom config with the base url to constant to Flutterwave\Service\Transactions class, it then throws an ArgumentCountError: Too few arguments to function Flutterwave\EventHandlers\TransactionVerificationEventHandler::__construct(), 0 passed in /Users/andre/Desktop/Workspace/saas-manager/vendor/flutterwavedev/flutterwave-v3/src/Service/Transactions.php on line 36 and exactly 1 expected in /Users/andre/Desktop/Workspace/saas-manager/vendor/flutterwavedev/flutterwave-v3/src/EventHandlers/TransactionVerificationEventHandler.php:17
MY PHP CODE BELOW:
public function validate(string $ref, string|int $otp): string
{
$res = (new Transactions())->validate($otp, $ref);
if ($res->status === 'success') {
return "Your payment status: " . $res->processor_response;
}
}
Hello I am trying to make a Direct Card Charge via the PHP SDK but getting
Error: Undefined constant Flutterwave\Helper\Config::BASE_URL in /Users/andre/Desktop/Workspace/saas-manager/vendor/flutterwavedev/flutterwave-v3/src/Service/Transactions.php:34
When I passed a custom config with the base url to constant to
Flutterwave\Service\Transactions
class, it then throws anArgumentCountError: Too few arguments to function Flutterwave\EventHandlers\TransactionVerificationEventHandler::__construct(), 0 passed in /Users/andre/Desktop/Workspace/saas-manager/vendor/flutterwavedev/flutterwave-v3/src/Service/Transactions.php on line 36 and exactly 1 expected in /Users/andre/Desktop/Workspace/saas-manager/vendor/flutterwavedev/flutterwave-v3/src/EventHandlers/TransactionVerificationEventHandler.php:17
MY PHP CODE BELOW: