Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello.
Stripe library in some methods takes an two arguments: $params and $options. Using function stripe_api_call it's possible to pass only $params, because we calling methods from Stripe library classes using this code:
call_user_func(array($class, $method), $params);
It would be nice if we change the function and add new argument $options.
This argument allows you to add additional headers to the request.
Comment | File | Size | Author |
---|---|---|---|
#4 | 8.x-1.x-dev-add-new-argument-in-stripe_api_call-2837949-3.patch | 1.32 KB | qzmenko |
#2 | 7.x-1.x-dev-add-new-argument-in-stripe_api_call-2837949-2.patch | 1.64 KB | qzmenko |
Comments
Comment #2
qzmenkoPatch attached.
After applying it, if you want, you can simply add $options as fourth parameter in function stripe_api_call.
Comment #3
qzmenkoComment #4
qzmenkoI noticed that this is also actual for the 8.x version of the module.
Patch attached for 8.x version.
Comment #5
knyshuk.vova CreditAttribution: knyshuk.vova at Internetdevels commentedThis comment describes that can be another structure of method signature
In the related issue provided better way of passing arguments.
Comment #6
knyshuk.vova CreditAttribution: knyshuk.vova at Internetdevels commentedPatch from related issue can be ported to Drupal 7 version.
Comment #7
grasmash CreditAttribution: grasmash commentedThis feels very messy. Can't we just always pass all arguments?