[英]Payum Paypal Rest config_path
我正在嘗試使用symfony(3.1.4)中的payum捆綁包實現paypal-rest付款。 我需要在我的Symfony應用程序中運行PayPal Plus。 因此我閱讀了這篇文章https://github.com/Payum/Payum/blob/master/docs/paypal/rest/get-it-started.md
現在,我不知道要將“ config_path”參數設置為什么,以及必須在此config_path中提供什么。
Symfony狀態
'The config_path fields are required.'
我的payum配置看起來像這樣的atm
payum:
security:
token_storage:
AppBundle\Entity\PaymentToken: { doctrine: orm }
storages:
AppBundle\Entity\Payment: { doctrine: orm }
gateways:
paypal_express_payment:
factory: paypal_express_checkout
username: "%ppe_uname%"
password: "%ppe_pw%"
signature: "%ppe_signature%"
sandbox: false
paypal_rest_payment:
factory: paypal_rest
client_id: "%ppr_cid%"
client_secret: "%ppr_sec%"
sandbox: true
paypal_express_payment部分工作正常。
如果我僅添加諸如“ my_config.txt”的隨機配置路徑,Symfony會指出
Request GetHumanStatus{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.
那么-config_path的位置和位置是什么?
我們非常歡迎您提供任何有助於正確指導的幫助或提示,以獲取更多文檔資料。
它應該是來自PayPal-PHP-SDK的sdk_config.ini
gateways:
paypal_rest:
factory: paypal_rest
client_id: '%paypal_rest.client_id%'
client_secret: '%paypal_rest.client_secret%'
config_path: '%kernel.root_dir%/config/sdk_config.ini'
更新:我不認為Payum PaypalRest插件支持Doctrine ORM存儲。 PaypalRest \\ Action \\ CaptureAction要求從PayPal \\ Api \\ Payment繼承模型(付款),然后使用其創建和執行方法進行付款捕獲。 我認為從Doctrine實體的PayPal \\ Api \\ Payment擴展不是一個好主意。
通過使用Payum \\ Paypal \\ Rest \\ Model \\ PaymentDetails作為付款和文件系統作為存儲,我能夠消除此錯誤:
payum:
storages:
Payum\Paypal\Rest\Model\PaymentDetails:
filesystem:
storage_dir: %kernel.root_dir%/Resources/payments
id_property: idStorage
嘗試將其設置為默認值,如下所示:
paypal_rest_payment:
factory: paypal_rest
client_id: "%ppr_cid%"
client_secret: "%ppr_sec%"
sandbox: true
config_path: ~
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.