How does the Payum Bundle configuration work?

I am new to Payum and I am trying to create a new payment gateway. However, I cannot understand how the configuration values ​​relate to the files I created (Actions / Factory, etc.).

That's what I still have

payum:
    security:
        token_storage:
            Path\To\PaymentSecurityToken:
                doctrine:
                    driver: orm
    contexts:
        xxx:
            yyyy:
                api:
                    options:
                        sandbox: true
        storages:
            Path\To\Payment:
                doctrine:
                    driver: orm

I do not get what I have to put in xxx and yyy . No matter what values ​​I try, I still do not understand. I keep getting the following error.

InvalidConfigurationException: Unrecognized options "yyy" under "payum.contexts.xxx"

Can someone tell me what these values ​​should be and how the values ​​I set are related to the gateway, and where is it necessary that the configuration actually matches something in the gateway code?

Thanks in advance :)

+4
1

yyyy - ( ) factory. . addConfiguration. ,

, Payum. . PaymentFactoryInterface Payum.

xxx - ( ). . , -. ( PayPal). - :

payum:
   contexts:
       paypal_eu:
           paypal_express_checkout_nvp:
               username: ~
               password: ~
               signature: ~
       paypal_us:
           paypal_express_checkout_nvp:
               username: ~
               password: ~
               signature: ~

, , :

$payment = $container->get('payum')->getPayment('paypal_eu');

P.S. docs.

+1

Source: https://habr.com/ru/post/1542735/


All Articles