{"action":"closed","issue":{"url":"https://api.github.com/repos/Payum/PayumBundle/issues/460","repository_url":"https://api.github.com/repos/Payum/PayumBundle","labels_url":"https://api.github.com/repos/Payum/PayumBundle/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/Payum/PayumBundle/issues/460/comments","events_url":"https://api.github.com/repos/Payum/PayumBundle/issues/460/events","html_url":"https://github.com/Payum/PayumBundle/issues/460","id":301207253,"number":460,"title":"Request Authorize{model: string} is not supported","user":{"login":"kubaceg","id":696884,"avatar_url":"https://avatars2.githubusercontent.com/u/696884?v=4","gravatar_id":"","url":"https://api.github.com/users/kubaceg","html_url":"https://github.com/kubaceg","followers_url":"https://api.github.com/users/kubaceg/followers","following_url":"https://api.github.com/users/kubaceg/following{/other_user}","gists_url":"https://api.github.com/users/kubaceg/gists{/gist_id}","starred_url":"https://api.github.com/users/kubaceg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubaceg/subscriptions","organizations_url":"https://api.github.com/users/kubaceg/orgs","repos_url":"https://api.github.com/users/kubaceg/repos","events_url":"https://api.github.com/users/kubaceg/events{/privacy}","received_events_url":"https://api.github.com/users/kubaceg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-02-28T22:25:13Z","updated_at":"2018-03-02T16:53:46Z","closed_at":"2018-03-02T16:53:46Z","author_association":"NONE","body":"I have problem with payum bundle and paypal_express_checkout in sf4. When I try to authorize payment I get:\r\n`Request Authorize{model: string} 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.`\r\n\r\nMaybe someone can help me, I try to debug this but after few hours I have no idea what's wrong.\r\n\r\nHere are my config files:\r\npayum.yml\r\n```\r\npayum:\r\n    security:\r\n        token_storage:\r\n            App\\Entity\\Payment\\PaymentToken: { doctrine: orm }\r\n\r\n    storages:\r\n        App\\Entity\\Payment\\Payment: { doctrine: orm }\r\n\r\n    gateways:\r\n        paypal:\r\n            factory: paypal_express_checkout\r\n            username: fdfd\r\n            password:  'fdfd'\r\n            signature: 'fdfd'\r\n            sandbox: true\r\n```\r\nEntity\\Payment\\Payment:\r\n```\r\n<?php\r\n\r\nnamespace App\\Entity\\Payment;\r\n\r\nuse Payum\\Core\\Model\\Payment as BasePayment;\r\n\r\nclass Payment extends BasePayment\r\n{\r\n    protected $id;\r\n}\r\n```\r\nEntity\\Payment\\PaymentToken:\r\n```\r\n<?php\r\n\r\nnamespace App\\Entity\\Payment;\r\n\r\nuse Payum\\Core\\Model\\Token;\r\n\r\nclass PaymentToken extends Token\r\n{\r\n}\r\n```\r\nAnd I move mapping into yaml:\r\n```\r\nApp\\Entity\\Payment\\Payment:\r\n    type: entity\r\n    id:\r\n        id:\r\n            type: integer\r\n            generator: {strategy: AUTO}\r\n\r\n    fields:\r\n\r\n        number:\r\n            type: string\r\n            nullable: true\r\n\r\n        description:\r\n            type: string\r\n            nullable: true\r\n\r\n        clientEmail:\r\n            type: string\r\n            nullable: true\r\n\r\n        clientId:\r\n            type: string\r\n            nullable: true\r\n\r\n        totalAmount:\r\n            type: integer\r\n            nullable: true\r\n\r\n        currencyCode:\r\n            type: string\r\n            nullable: true\r\n\r\n        details:\r\n            type: json_array\r\n            nullable: true\r\n```\r\n```\r\nApp\\Entity\\Payment\\PaymentToken:\r\n    type: entity\r\n    id:\r\n        hash:\r\n            type: string\r\n            generator: {strategy: NONE}\r\n\r\n    fields:\r\n\r\n        details:\r\n            type: string\r\n            nullable: true\r\n\r\n        afterUrl:\r\n            type: string\r\n            nullable: true\r\n\r\n        targetUrl:\r\n            type: string\r\n            nullable: false\r\n\r\n        gatewayName:\r\n            type: string\r\n            nullable: false\r\n```\r\nAuthorize initialization\r\n```\r\n        $gatewayName = 'paypal';\r\n\r\n        /** @var StorageInterface $storage */\r\n        $storage = $this->get('payum')->getStorage(Payment::class);\r\n\r\n        $payment = $storage->create();\r\n        $payment->setNumber(uniqid());\r\n        $payment->setCurrencyCode('EUR');\r\n        $payment->setTotalAmount(123);\r\n        $payment->setDescription('A description');\r\n        $payment->setClientId('anId');\r\n        $payment->setClientEmail('foo@example.com');\r\n\r\n        $storage->update($payment);\r\n\r\n        /** @var TokenInterface $captureToken */\r\n        $captureToken = $this->get('payum')->getTokenFactory()->createAuthorizeToken(\r\n            $gatewayName,\r\n            $payment,\r\n            'success'\r\n        );\r\n\r\n        return $this->redirect($captureToken->getTargetUrl());\r\n```"}}
{"actor":{"display_login":"kubaceg"}}