Hi.

I got this necessity from a payment provider:

customParameters

https://sibs.docs.onlinepayments.pt/tutorials/webhooks/integration-guide

when invoking payment (on test mode).

Is it possible to have a text area where we can insert these extra params or another form of adding values to web hooks?

I assume it's not, ATM.
Can I have some hints where I can customize the code just to test it, by inserting this "customParameters"?

thanks.

Comments

jrochate created an issue. See original summary.

agoradesign’s picture

You're referring to webhooks, which aren't implemented at all atm, so there's no custom parameters to add to. See here for the corresponding issue: #3020030: Implement web hooks

agoradesign’s picture

Status: Active » Postponed

So I need to postpone the issue on that.

If you need/want to add parameters to the "prepare the checkout" step (https://sibs.docs.onlinepayments.pt/tutorials/integration-guide) with one of the missing parameters from here, we'll need to provide a way to alter the request data before they get sent. Meaning that we'd need to fire an event before actually sending the data in this function here: https://git.drupalcode.org/project/commerce_opp/blob/8.x-1.x/src/Plugin/...

PrepareOppCheckoutEvent would be a suitable name for the event class btw.. If we do that, you could subscribe for this event in a custom hook and do your changes there.

Here's an example on how to do this: https://git.drupalcode.org/project/commerce_klarna_payments/blob/8.x-1.x...
Also Commerce has a couple of events getting fired

Feel free to open an issue for that request and ideally also to provide a patch. I'll be pleased to review then.. otherwise I don't know, when it would fit me to write this functionality (but maybe I could find time in the upcoming weeks)

agoradesign’s picture

Title: Is it possible to define customParameters » Extend configuration to support brands with specific custom required parameters
agoradesign’s picture

Category: Feature request » Task
Status: Postponed » Active
agoradesign’s picture

In the end, the best way will be to specify dedicated payment gateway plugins for brands that need special attention. And we'll start by implementing MBWAY and then SIBS_MULTIBANCO.

We have currently some special handling for SOFORTUEBERWEISUNG in our virtual account gateway. It would make sense to put this in a dedicated gateway too in a follow-up

  • agoradesign committed 9f6f8f1 on 8.x-1.x
    Issue #3071745 by agoradesign: Extend configuration to support brands...
agoradesign’s picture

Status: Active » Fixed

ok, what I've commited here, is just some base work for the implementation of the dedicated gateways. Included is a reduction of the redundant code within the config schema. That should be the right way to re-use common config values hopefully.

Also a drive-by fix of listing all OPP brands on the credit card gateway config form is included

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.