Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    David Fuhr
    @davidfuhr
    hm.. so maybe overriding the render-template-action on application level might do...
    Max Kotliar
    @makasim

    hm.. so maybe overriding the render-template-action on application level might do...

    Sure it is also the way to go

    David Fuhr
    @davidfuhr
    i found an event better solution. i enabled the EventDispatcherExtension and inject the parameters in an event listener
    there is no documentation about the EventDispatcherExtension. is there a place where new docs about this extension should go? or just add a new file in https://github.com/Payum/Payum/tree/master/src/Payum/Core/Resources/docs ?
    Max Kotliar
    @makasim
    Yes you can add it there, no special rules
    David Fuhr
    @davidfuhr
    @makasim hey! the 1.2.9 tag is missing on the payum/core repository. would be great if you could add the tag there as well!
    Max Kotliar
    @makasim
    that's not that easy
    I have to do a subtree split for a specific branch (1.2) and only for core lib
    before I am able to tag it
    Alfonso M.
    @alfonsomga
    Hi, how can I get the current payment status of an existing payment? for example, I would like to verify from my backend application panel if a payment with status "pending" now his status is "captured".
    Alfonso M.
    @alfonsomga
    I'll have a "Verify payment status" button in my backend application panel so I can manually check the current status of an payment and then finally do X actions if the payment status is "captured".
    I know I could automate that using Instant Payment Notification (https://github.com/Payum/Payum/blob/master/src/Payum/Core/Resources/docs/instant-payment-notification.md) but I want to do this manually.
    Alfonso M.
    @alfonsomga
            $gateway = $this->get('payum')->getGateway('paypal_express_checkout');
            $gateway->execute($foo = new Sync($transaction->getPaymentToken()));
            dump($foo);
    DId the trick.
    Safoor Safdar
    @safoorsafdar
    Hi, all. Can i create gateway level configuration to use later in action, or request?
    like env variable
    Max Kotliar
    @makasim
    Hi
    Yes you can do it. There are several ways to achieve it:
    1. By providing a custom gateway factory and pass desired config options to an action.
    2. By creating a config and using it as api. Something like I did in Stripe extension: https://github.com/Payum/Payum/blob/master/src/Payum/Stripe/StripeCheckoutGatewayFactory.php#L60
    Safoor Safdar
    @safoorsafdar
    thanks for your response.
    well, i totally understand that.
    I'm trying to use MerchantAuthenticationType class from authorized.net sample code implementation repo.
    everything working fine by using this class as separate api
    but the only thing is hardcoded, which is:
    Safoor Safdar
    @safoorsafdar
    thanks Makism, I resolve my sharing config issue using 2 suggestion of you.
    Toni Rudolf
    @toooni

    hi @makasim I just created a new gateway for Postfinance, a local PSP/bank here in switzerland. Now I wanted you to ask how you would implement the forwarding of error messages from the api to my symfony app. For example, if something is wrong with the expiration date of the credit-card I just get an error code in the response and want to add an error to the expiration date of the form.
    I had two solutions in mind:

    • Check the status code directly in the API and throw exceptions like "InvalidExpirationDate" directly in the API and catch those in the controller
    • Check the status code in my payment event listener (onPostExecute), and throw the exceptions there (so the logic is decoupled from the gateway)

    What is the way to go? I checked some other gateways but I didn't find something comparable.

    Max Kotliar
    @makasim

    The api should not do anything like that, it just send some raw data to the payment gateway and returns the response.
    The response is stored in the payment details, It is your state of the payment.

    Here you have options what to do next:

    1. You can create an extension, or listener to specific for this particular gateway. It check details and act according to it.
    2. You can also create a new request let's say GetCreditCardErrors and an action able to populate those errors from the details.
    I personally prefer the second approach as you kind of building the domain language. And it is clear what is going on, any magic that happens in the extension.
    I dont think the exception is a good way to go here. It is not an exceptional situation.
    Toni Rudolf
    @toooni
    Thank you very much! This will do the job..
    g0ld3lux
    @g0ld3lux
    @makasim Do you have sample to work on paypal rest api?
    ikeman
    @ikeman_twitter
    hi guys, can anyone tell me how to build payum with DoctrineStorage as GatewayConfigStorage in a [symfony 3, payum-core 1.3.7, payum-bundle 2.1] environment? This https://github.com/Payum/Payum/blob/master/src/Payum/Core/Resources/docs/configure-gateway-in-backend.md does not help, because symfony has its own PayumBuilder instance. What I am doing wrong?
    Toni Rudolf
    @toooni
    @ikeman_twitter are you searching for this config?
    payum:
        storages:
            AppBundle\Entity\YourEntity: { doctrine: orm }
    ikeman
    @ikeman_twitter

    Hi @toooni . Unfortunately, no. :smile:
    By default the payum gateways are configured in a config.yml/payum.yml file in symfony.
    But in my application I will have a lot of gateways for different customers, with different credentials.
    And so I discovered the DoctrineStorage for gateway config (instead of file based).
    And there is also a snippet how to configure (from the page I posted above).

    $gatewayConfigStorage = new DoctrineStorage($objectManager, 'Acme\Payment\Entity\GatewayConfig');
    /** @var Payum $payum */
    $payum = (new PayumBuilder())
        ->addDefaultStorages()
        ->setGatewayConfigStorage($gatewayConfigStorage)
        ->getPayum();

    But I don't know how to introduce/combine this feature with symfony.

    ikeman
    @ikeman_twitter
    @makasim That solved it. thx. I was so blind...
    binarious
    @binarious
    @makasim Do you have an example on how to handle PayPal IPNs with the latest PayumBundle? Does https://gist.github.com/binarious/08fda89ec326e37a9254 still work and is it a good idea?
    Max Kotliar
    @makasim
    it may work, but you should not do all of that. You have to add an extension which handles the payment status change. https://github.com/Payum/Payum/blob/master/src/Payum/Core/Resources/docs/instant-payment-notification.md
    There is a notify action in the payum paypal extension which does all the validation, sync and so on.
    The link is also auto generated when you send the payment to paypal.
    binarious
    @binarious
    @makasim I see. Is it meant to handle the capture event, too? Where do I need to register that for the PayumBundle?
    Max Kotliar
    @makasim

    Where do I need to register that for the PayumBundle?

    you can add it in config.yml

    payum:
        gateways:
           foo:
              payum.extension.foo: "@service_id"
    or you can add a tag to the ext service. If I recall it correctly the tag name is payum.extension
    binarious
    @binarious
    Ah great, thank you. It's pretty hard to get this information by the provided documentation at the moment.
    @makasim And is it meant to handle the capture event, too?
    Max Kotliar
    @makasim
    You can handle it too
    why not
    binarious
    @binarious
    Interesting. Will check it out. Thanks :)
    Max Kotliar
    @makasim
    I am bad on writing docs.
    sorry
    binarious
    @binarious
    No problem ;). A complete example (with ipn) would be helpful for people, I think. At least a bit more in detail than the Sandbox.