I'm trying to implement Paypal REST payment method on sylius and I got the following error:
Request GetStatus{model: ArrayObject} is not supported. 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.
With some researches I find out that's because the storage for paypal rest payment is misconfigured (cf Payum Paypal Rest config_path accepted response).
So I tried to modify the config of the gateway as shown in the following code:
payum:
storages:
Payum\Paypal\Rest\Model\PaymentDetails:
filesystem:
storage_dir: '%kernel.root_dir%/Resources/payments'
id_property: idStorage
gateways:
paypal_rest:
factory: paypal_rest
client_id: foo
client_secret: bar
config_path: '%kernel.root_dir%/config/sdk_config.ini'
sandbox: true
Nothing change, I still get the same error.
So in the Paypal Rest GetStatus request I tried to dump the request to know why it is not supported. The request must be an instance of GetStatusInterface (it's my case) and $request->getModel()
must be an instance of Payment but I have an ArrayObject instead. Here is the full dump of the model:
#model: ArrayObject {#4410 ▼
#input: null
flag::STD_PROP_LIST: false
flag::ARRAY_AS_PROPS: false
iteratorClass: "ArrayIterator"
storage: []
}
I guess that my storage is not right configured because it is empty but I don't understand why because I did it in my config.yml file.
Hope someone has a solution ;)