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.
I spotted that the service call function is not passing on all the parameters needed for connect direct charges, namely the stripe_account parameter. Have made the following changes to enable:
- public function call($obj, $method = NULL, $params = NULL) {
+ public function call() {
+ $args = func_get_args();
+ $obj = array_shift($args);
+ $method = (count($args)>=1)?array_shift($args):NULL;
+ $params = (count($args)>=1)?$args:NULL;
+
$obj = ucfirst($obj);
$class = '\\Stripe\\' . $obj;
if ($method) {
try {
- return call_user_func([$class, $method], $params);
+ return call_user_func_array([$class, $method], $params);
}
Comment | File | Size | Author |
---|---|---|---|
#5 | stripe_api-limit-of-arguments-number-2858762-5.patch | 2.41 KB | knyshuk.vova |
Comments
Comment #2
knyshuk.vova CreditAttribution: knyshuk.vova at Internetdevels commentedComment #3
knyshuk.vova CreditAttribution: knyshuk.vova at Internetdevels commentedComment #4
knyshuk.vova CreditAttribution: knyshuk.vova at Internetdevels commentedThis is also due to the inability to send some arguments to the Stripe's method using this module. This module allows you to specify only the first argument of the method that will be passed to the Stripe's method. All other arguments can not be passed. Take a look on the method 'update' here:
https://github.com/stripe/stripe-php/blob/master/lib/Customer.php
In this 'update' method we can see that there are three variables can be passed. But current module implementation allows only one variable to be passed.
Comment #5
knyshuk.vova CreditAttribution: knyshuk.vova at Internetdevels commentedWhat was done:
- Fixed limit of arguments number
- Updated function doc
- Used injected logger
Comment #7
knyshuk.vova CreditAttribution: knyshuk.vova at Internetdevels commented