• Resolved kibus90

    (@kibus90)


    Hello,

    I would like to check something with my custom function.

    Is it possible to use e.g.:

    $stripe = new \Stripe\StripeClient(
      'sk_your_key'
    );
    $stripe->sources->retrieve(
      'src_1JnChv2eZvKYlo2CGbRagYAZ',
      []
    );
    

    It is from here:
    https://stripe.com/docs/api/sources/retrieve?lang=php#retrieve_source

    If yes then how? Because when I try to do it then I get Fatall error:
    ‘ PHP Fatal error: Uncaught Error: Class ‘Stripe\StripeClient’ not found’

    Thank you in advance for help.

Viewing 1 replies (of 1 total)
  • Howdy 🙂

    That documentation is specific to the Stripe SDK which is not used by the WooCommerce Stripe payment gateway as we use the WordPress HTTP API to send and receive our requests rather than relying on the SDK.

    I’m sure that you can use it, but you’d need to include the files before instantiating the class.

Viewing 1 replies (of 1 total)
  • The topic ‘How can I use Stripe API Reference PHP?’ is closed to new replies.