Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gateway variants #4396

Closed
BlackIceWizard opened this issue Mar 4, 2016 · 12 comments

Comments

Projects
None yet
9 participants
@BlackIceWizard
Copy link

commented Mar 4, 2016

Good afternoon!

I do not know when it happened, but in my local copy and in your demo site disappeared from the gateway list all options except "Offline". I think Sylius must have at least one option preconfigured Omnipay gateway.

@pjedrzejewski

This comment has been minimized.

Copy link
Member

commented Mar 5, 2016

Hi @BlackIceWizard! We have removed default configurations to simplify installation. We need to document how to configure them, this is quite straightforward.

@BlackIceWizard

This comment has been minimized.

Copy link
Author

commented Mar 5, 2016

Installation was really long. But it is quite clear all configured options of payment systems discourage those who had not previously worked with the payment systems. How about to make gateways customizable through the administrative part of the site? Or make these settings in the additional console command...

@macro64

This comment has been minimized.

Copy link

commented Mar 14, 2016

Hey! I am one of those who had not previously worked with the payment systems.
I already spent a reasonable while trying to figure out how to implement a payment-gateway (no specific, just for testing) and feel quite lost since neither the docs nor the code seem to give me any hints. Any quick recommendations and/or code-snippets? Thanks!

@Arminek

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2016

Hi @macro64 , could you please tell me what are you going to do. Do you need this for some kind of CI or only to test it by your own in your local environment ? I will show you an example how to configure payment gateway check this pull request https://github.com/Sylius/Sylius-Docs/pull/415/files here is example of paypal checkout express configuration. For more examples you should check this https://github.com/Payum/PayumBundle/blob/master/Resources/doc/configuration_reference.md
Don't forget to enable your new configured payment method in your channel ;)

@macro64

This comment has been minimized.

Copy link

commented Mar 15, 2016

Hey @Arminek , Thank you very much for your help!
With the code and reference you provided I was able to add the payment options and continue further.
I'm working in a local enviroment and try to evaluate if Sylius fits my needs for a upcoming project. Thanks again!

@janrop

This comment has been minimized.

Copy link

commented Mar 16, 2016

@Arminek could you elaborate on how you knew what the config values are supposed to be called ("paypal_express_checkout", "paypal_express_checkout_nvp")? Where do I find out what config values I need for other Payment-Providers I might want to activate?

@Arminek

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2016

Sure i will explain this on simple example. Let's assume that you need for example some kind of offline payment method maybe cash on delivery.

payum:
    gateways:
        your_method_name:
            predefined_gatway_factory_name:
                specific_arguments_based_on_gateway:
                    .
                    .

So your configuration will look like:

payum:
    gateways:
        cash_on_delivery:
            offline: ~

Advanced example:

payum:
    gateways:
        paypal_express_checkout:
            paypal_express_checkout_nvp:
                username: john@example.com
                password: test_acc
                signature: signature_from_paypal
                sandbox: true

There is one more configuration for admin side (UI)

sylius_payment:
    gateways:
        offline: Offline
        cash_on_delivery: Cash on delivery
        paypal_express_checkout: Paypal Express Checkout

Sylius uses payum bundle for handling payments for more examples check https://github.com/Payum/PayumBundle/blob/master/Resources/doc/configuration_reference.md
Also there is a command for payment method debugging it displays some information about configured payment gateways.
app/console payum:gateway:debug
Example output:
zrzut ekranu 2016-03-16 o 22 54 32

@janrop

This comment has been minimized.

Copy link

commented Mar 18, 2016

Just a follow-up question. If I tried using a payum bundle that did not came with the standard version of payum (https://packagist.org/packages/payum/sofort) would I have to register it somewhere in the Symfony/PayumBundle?

Because in the SofortGatewayFactory I see

'payum.factory_name' => 'sofort'

but when I edit the config.yml like so:

        sofort_ueberweisung:
            sofort:
                config_key: "cjwvqehtzavb"
                abort_url: "http://127.0.0.1:8000"

I get

Unrecognized option "sofort" under "payum.gateways.sofort_ueberweisung"

From the payum:gateway:debug command.

Do I have to edit /vendor/sylius/sylius/src/Sylius/Bundle/PayumBundle/Resources/config/services.xml?

@pamil

This comment has been minimized.

Copy link
Member

commented Mar 18, 2016

@Arminek the font in your terminal needs to be fixed 🐎 🐃 🐌

@Zales0123

This comment has been minimized.

Copy link
Member

commented Mar 18, 2016

@Arminek I absolutely agree with @pamil, your font in a terminal is unacceptable 👿

@makasim

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2016

@janrop

Do I have to edit /vendor/sylius/sylius/src/Sylius/Bundle/PayumBundle/Resources/config/services.xml?

No, You dont have to edit it.

Unrecognized option "sofort" under "payum.gateways.sofort_ueberweisung"

There is not a factory in the bundle for sofort official extension. There are two ways to go.

  • Use unofficial sofort extension.
  • Write a factory like this: StripeJsGatewayFactory
  • Make Sylius work with PayumBundle 2.x (Contains BC breaks). The official extension is supported by PayumBundle 2.x
@CoderMaggie

This comment has been minimized.

Copy link
Member

commented Oct 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.