Closed joesenova closed 1 year ago
The issue is the next line in the Cache Dev directory:
App_KernelDevDebug.php
$instance->addCoreGatewayFactoryConfig(['twig.env' => ($this->services['.container.private.twig'] ?? $this->get_Container_Private_TwigService())]);
This line fails and causes the Storage extensions to not be added to the CoreGatewayConfig on the following line.
The fix will be to remove the twig.env = new Reference('twig')
from the config.
Then replace where twig.env is called with with new Environment(new FileSystemLoader())
Then also remove all the config tests that test for twig.env is of Twig\Environment::class, that will be true as it will create a new instance of Environment().
This commit in the Payum/Core is the cause of this bug.
I will post a PR to fix this soon
Here is the PR for this bug
@joesenova I think the issue here is with the entities.
You have a class PaymentDetails
which extends App\Entity\Payment
, and your App\Entity\Payment
class extends ArrayObject
. None of your entities extends Payum\Core\Model\Payment
, which is required for most of the actions to be executed. (You can have a look at the Configure docs to see how the entities can be configure)
Believe I went through all that, nothing changed in config side.
We had it working before, updated the core and it stopped working.
I fixed it and using our own forked branch now. The core is doing something weird with the config building in the Dependency Injection builder.
look at the config of the Twig Env builder and see what the array replace recursive does in the core.
look at the config of the Twig Env builder and see what the array replace recursive does in the core.
I have, and it doesn't do anything weird. The twig.env
value is correctly being added to the config. array_replace_recursive
won't clear any existing values, it will just append the value to the array if it doesn't exist, and if the keys exist, then it will just replace the values for that specific key and won't clear anything else in the array
I am busy debugging every extension and overload we do on twig, will revert if I find anything that causes the break on the Payum Builder code to case the storage extension not to laod.
This is the error I get after upgrading to Symfony 6 from Symfony 4. I have removed the entire bundle and all code references. I reinstalled the bundle and reimplemented the Payum Bundle, still the same error. I use the Payum Bundle with The payPal Express Checkout gateway.
Request Capture{model: Identity} is not supported. Make sure the storage extension for "App\Entity\PaymentDetails" is registered to the gateway. Make sure the storage find method returns an instance by id "289". Make sure the gateway supports the requests and there is an action which supports this request (The method returns true). There may be a bug, so look for a related issue on the issue tracker.
Also no storages are registered either:
A storage for model App\Entity\Payment was not registered. There are storages for next models: .
A storage for model App\Entity\PaymentDetails was not registered. There are storages for next models: .
config.yaml
Please can anyone let me know if there is Symfony 6 issues with this bundle, and if so, where can I start looking to get this fixed.
I have the following files too:
Payment.php
PaymentDetails.php
Token Object from doAction():
Partial from the gateway object:
The following code fails: CaptureController.php
Gateway.php -> dump($request)
This returns true:
But this gives the Initial Error on this post: Request Capture{model: Identity} is not supported
Partial dump($context);
Also this fails When I try comment out some of the supports methdos that seem to nt be working:
Request GetHumanStatus{model: Identity} is not supported.
All of this points back to my Entity, PaymentDetails, that is not registered to the Gateway?
Make sure the storage extension for "App\Entity\PaymentDetails"
Thank you.