Jump to content
thirty bees forum

Stripe 1.6.2 Error 500


30knees

Recommended Posts

I'm getting a 500 server error message at the "Card verified, redirecting" stage.

I've copied the error code, which looks like def5020***. If it's safe to do so, I can post it here.

I'm using the latest Stripe API and the logs in the Stripe account don't show anything. The customer is captured, but the payment isn't.

Any idea how to troubleshoot?

Link to comment
Share on other sites

Thank you! :)

I get the following:

```

ThirtyBeesException

Class 'Stripe\Customer' not found
at line 119 in file modules/stripe/vendor/stripe/stripe-php/lib/Util/Util.php
php 114. if (isset($resp['object']) && is_string($resp['object']) && isset($types[$resp['object']])) { 115. $class = $types[$resp['object']]; 116. } else { 117. $class = 'Stripe\\StripeObject'; 118. } 119. => return $class::constructFrom($resp, $opts); 120. } else { 121. return $resp; 122. } 123. } 124. /**
- ThirtyBeesStripe\Stripe\Util\Util::convertToStripeObject - [line 135 - modules/stripe/vendor/stripe/stripe-php/lib/ApiResource.php]
- [2 Arguments]
php 130. protected static function _create($params = null, $options = null) 131. { 132. self::_validateParams($params); 133. $url = static::classUrl(); 134. list($response, $opts) = static::_staticRequest('post', $url, $params, $options); 135. => $obj = \ThirtyBeesStripe\Stripe\Util\Util::convertToStripeObject($response->json, $opts); 136. $obj->setLastResponse($response); 137. return $obj; 138. } 139. /** 140. * @param string $id The ID of the API resource to update.

and more, but it looks like the above is the relevant part.

Link to comment
Share on other sites

It seems like the problem is that the module prefixed namespace of stripe library with ThirtyBeesStripe, but the prefixer program didn't replace references inside Util.php - it tries to use unprefixed class Stripe\Customer instead of ThirtyBeesStripe\Stripe\Customer

You can try to modify file modules/stripe/vendor/stripe/stripe-php/lib/Util/Util.php, edit function convertToStripeObject, and add this ThirtyBeesStripe prefix to all objects in $types array, and also on line 117.

But obviously this needs to be fixed on different level - paging @mdekker

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...