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);
       }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

powysm created an issue. See original summary.

knyshuk.vova’s picture

Assigned: Unassigned » knyshuk.vova
knyshuk.vova’s picture

Issue tags: +LutskGSW18
knyshuk.vova’s picture

This 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.

knyshuk.vova’s picture

What was done:
- Fixed limit of arguments number
- Updated function doc
- Used injected logger

  • knyshuk.vova committed 91835b0 on 8.x-1.x
    Issue #2858762 by knyshuk.vova: limit of arguments number
    
knyshuk.vova’s picture

Assigned: knyshuk.vova » Unassigned
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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