paypal - payum symfony 2 bundle - basic configuration - storage -
In order to allow PayPal payments to customers, I need to configure the Paid Bundle.
I have followed the official recomendations, but need to configure something else, I think (maybe I'm missing somewhere to configure storage for payment deposits somewhere).
My config files are as follows:
** app / config.yml ** Principle: ORM: auto_generate_proxy_classes: true entity_managers: default: mapping: WebsiteDeviceBundle: ~ WebsiteOnePageBundle : ~ Payum: is_bundle: false type: xml dir:% kernel.root_dir% / .. / vendor / salary / salary / source / pay / core / bridge / theory / resource / mapping prefix: pam \ core \ model pem: security : Token_Storage: Website \ Bundle \ DeviceBundle \ unit \ PaymentToken: {Principle: ORM} Store: Website \ Bundle \ DeviceBundle \ unit \ PaymentDetails: {Siddha D: ORM} references: express_euro: paypal_express_checkout_nvp: username: '' password: '' signature: '' sandbox: right
This is my admin task to initiate the payment process
Prepare public functions () {$ paymentName = 'express_euro'; $ Collection = $ this- & gt; Receive ('PEM') - & gt; GetStorage ('website \ device bundle \ existance \ payment details'); $ Order = $ storage- & gt; CreateModel (); $ Order- & gt; SetNumber (uniqid ()); $ Order- & gt; SetCurrencyCode ('euro'); $ Order- & gt; SetTotalAmount ($ this-> View ['User'] - & gt; Money); $ Order- & gt; SetDescriptSignin ('annual account subscription'); $ Order- & gt; SetUser ($ this-> View ['User'] - & gt; getId ()); $ Order- & gt; Set CreativeAet (new \ DateTime)); $ Order- & gt; SetClientEmail ($ this-> View ['User'] - & gt; getEmail ()); $ Storage & gt; UpdateModel ($ order); $ CaptureToken = $ this- & gt; Receive ('payum.security.token_storage') - & gt; CreateCaptureToken ($ paymentname, $ command, 'done' // path to redirect after capture;); $ $ Return - ($ captureToken-> getTargetUrl ()); }
and this is the PaymentDetails class
& lt; Php namespace website \ bundle \ device bundle \ unit; Use the theory / ORM \ mapping as an ORM; Use PEM \ core \ Model \ ArrayObject; / ** * PaymentDetails * * @ORM table (name = "PaymentDetails", indexed = {@ ORM} index (name = "user", column = {"user"})}) * @ORM \ unit (repositoryClass = ArrayObject {/ ** * @var string * * @ORM \ column (name = "currency_code", type = "string", length = 255, "web site \ bundle \ DeviceBundle \ unit \ PaymentsDetailsRepository") * / Square PaymentDetails extends = Incorrect) * / Private $ currencyCode; / ** * @ string string * * @ORM \ column (name = "description", type = "text", faucet = true) * / personal $ details; / ** * @ windy date * * @ORM \ column (name = "created", type = "day-time", faucet = true) * / personal $ build; / ** * @ Var integer * * @ORM \ column (name = "number", type = "integer", faucet = incorrect) * / private $ number; / ** * @ integer * * @ORM \ column (name = "total_mount", type = "integer", faucet = incorrect) * / private $ total; / ** * @ string string * * @ORM \ column (name = "client_mail", type = "text", faucet = incorrect) * / private $ clientEmail; / ** * @ wind vertex * * @ORM \ column (name = "id", type = "bitit") * @ORM \ Id * @ORM \ generated value (strategy = "detection") * / personal $ id; / ** * @var \ website \ bundle \ DeviceBundle \ unit \ user * * @ORM \ ManyToOne (targetEntity = "website \ bundle \ DeviceBundle \ unit \ user") * @ORM \ JoinColumns ({* @ORM \ JoinColumn ( Name = "user", referenced columnname = "id") *}) * / personal $ user;
And it comes when I get the doneAction () URL, it does not have a storage \ DeviceBundle \ Entity \ PaymentDetails for the
Models website Was lodged. The next models are storage: website \ bundle \ device bundle \ unit \ PaymentDetails
Any help or suggestions?
$ storage = $ this- & gt; ('Payum') - & gt; GetStorage ('Website \ DeviceBundle \ unit \ PaymentDetails'); In
$ storage = $ this- & gt; ('Payum') - & gt; GetStorage ('website bundle \ DeviceBundle \ unit \ payment statement');
And now it works.
Comments
Post a Comment