30knees Posted April 26, 2018 Posted April 26, 2018 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?
datakick Posted April 26, 2018 Posted April 26, 2018 Error code won't help us, it's encrypted using your server's key. You'll need to paste it to Advanced Parameters > Logs > Decrypt an exception message to get plain version. Then you can decide if it's safe to post it here
30knees Posted April 26, 2018 Author Posted April 26, 2018 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.
datakick Posted April 26, 2018 Posted April 26, 2018 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now