-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
published config file is not applied at all #95
Comments
as the name your config file should be exists in |
Yes, I've already used that artisan command and the file does exist at config/payment.php. But anything I configure in config/payment.php is not applied including merchantId. |
run your project outside of docker and publish vendors, then check if every thing goes correctly or not and let me know about it. |
Dear friend, I tried running the project outside docker on production environment. The problem still exists. Could you please determine where in your code that published vendor config file is read?
So, getting those invoice and payment objects shows that my merchantId is empty string and other configs are not applied, too. Also, another issue I saw was when I tried to run static function calls as suggested in github document like:
Purchase function seems to be declared as a non-static function in driver files (like Zarinpal.php).
But called statically in github document like the above call. |
you have done a mistake in your codes. change the codes like the below: // Create new invoice.
$invoice = (new Invoice)->amount(1000);
// Purchase and pay the given invoice.
// You should use return statement to redirect user to the bank page.
return Payment::purchase($invoice, function($driver, $transactionId) {
// Store transactionId in database as we need it to verify payment in the future.
})->pay()->render(); and about |
You're right! Thank you for your support! Actually there were 2 classes called Payment. And I had added the other one (by PHPStorm autocomplete), instead of Payment facade. |
Hi! I'm trying to run your package on laravel 5.8 using docker (laradock).
There seems to be a problem in Payment class:
When I dd static::getDefaultConfigPath() here, I get the path to the config file of the package instead of my published vendor file which I have configured.
I tried removing my own config file and republishing vendor. I also tried clearing cache and config with artisan commands. But my own config file is not applied at all!
The text was updated successfully, but these errors were encountered: