PayPal Adaptive Payments – Class 'string' not found

  • Home
  • Forums
  • Dokan
  • PayPal Adaptive Payments – Class 'string' not found
This topic contains 3 reply and 2 voices, and was last updated by Mike 8 years, 10 months ago
Viewing 3 Posts - 1 through 3 (of 3 total)
Author Posts
May 22, 2015 at 6:04 am 44862
Mike I'm getting an error originating within the PayPal PHP SDK in the Adaptive Payments plugin. On checkout, I get this: Fatal error: Class 'string' not found in [...]/wp-content/plugins/dokan-paypal-adaptive-payments/lib/vendor/paypal/sdk-core-php/lib/PPMessage.php on line 103 It seems that this is a bug in old versions of the library, although I was not able to fix the problem by adding the associated fix. Because of refactors to the SDK, I'm not able to drop in an updated version past 1.4.2, which still seems to have this problem. Any help here?
May 23, 2015 at 6:46 am 44911
Mike Mike

Some updates on my findings…

I’m still not sure where things are going wrong, but it appears that the SDK uses doc comments to determine which type of object is created, and on the requestEnvelope field in the PayResponse class, it’s not successfully getting any doc comment to parse, so it falls back to ‘string’.

If I hardcode if ($propertyName == "responseEnvelope") return 'ResponseEnvelope'; into the PPUtils::propertyType method, then I can at least submit an order and have it go through to PayPal as expected, but this is far from a solution. I’ll update this if I can figure out why the ReflectionProperty is failing to get the comment.

May 23, 2015 at 11:57 am 44920
towhid towhid

Hello Mike,

I have reproduced this issue but did not get any inconsistency. Everything is working fine. Make sure you have properly configured PayPal adaptive settings on Dokan.

Please check following documentation –
http://docs.wedevs.com/get-api-app-id/
http://docs.wedevs.com/configure-paypal/

Thanks

May 27, 2015 at 3:44 am 45264
Mike Mike

Thank you for the info, but everything is configured correctly.

I found the source of the issue, however. It looks like eAccelerator is enabled on WP Engine, where we’re hosting our site, and that strips doc comments from the source when caching. I’m checking with their support now to see if I can have it disabled for this site.

Viewing 3 Posts - 1 through 3 (of 3 total)