Timeline for Commerce Stripe and 2.0 version of library with namespace?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 2, 2015 at 13:48 | vote | accept | angms.bh | ||
Aug 19, 2015 at 17:08 | comment | added | wilburunion | \Stripe\Stripe class::method, is for the version 2.x library. Stripe_Stripe class::method with the UNDERSCORE is how the version 1.x library works - and the calls and syntax beyond that is the same. In the answer above \Stripe\Action-to-Take:: - "Action-to-Take" is the same as the "Stripe class" - by name - for instance "Charge". (Charge.php) When Stripe adds other support like "bitcoin" - it is and was added as a Stripe class "BitcoinReceiver.php" (and another) to the Stripe library and is called and declared registered in init.php, So one should always use init.php loading the library | |
Aug 18, 2015 at 18:49 | comment | added | angms.bh | The new github reference is github.com/angms-bh/bh_commerce_stripe_oauth. You will need to define your client url and secret key at the top | |
Aug 18, 2015 at 14:49 | comment | added | angms.bh | I have uploaded my code for OAuth flow implementation at github.com/angms-bh/bh_c_stripe_oauth It is not abstracted out at all, just my implementation. Be sure to read how that OAuth flow works at stripe.com/docs/connect/standalone-accounts. The install module within the code needs to be enabled first. I separate out my installation into another module for easier testing. Once you have the stripe_user_id, you use this in the 'destination' parameter of a charge. If you need to send me a message, use drupal.org. My user id is angms-bh | |
Aug 15, 2015 at 20:24 | comment | added | wilburunion | Also - if you use the uc-stripe code - you should be aware a better way is to use the Stripe init.php and not their individual calls to the class files BECAUSE when the library is updated with another file the init.php file will have it - while the include format of the uc-stripe version setup WILL NOT - one would need to add it manually or use require_once('./sites/all/libraries/stripe-php/init.php'); in the code. I'd would like to see how you got the Oauth2 flow working - I am not sure why you would submit it to either (assume Drupal) project - but the code should work for Commerce or UC | |
Aug 15, 2015 at 17:56 | comment | added | angms.bh | I have implemented that OAuth2 flow already for Connect. I am not sure which project I should submit my code to for review. Any ideas? | |
Aug 15, 2015 at 17:34 | comment | added | angms.bh | Woohoo. Your suggestion gave me a clue. My code for loading the library works. I needed to access the Stripe classes using \Stripe\Stripe::Action-to-Take. I am loading it using namespaces. I will make this suggestion to ubercart and to the commerce_stripe project | |
Aug 15, 2015 at 1:46 | history | answered | wilburunion | CC BY-SA 3.0 |