Home Forums Theme Support Dokan PayPal Adaptive Payments – Class 'string' not found

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Mike 4 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44862

    Mike
    Participant
    Post count: 11

    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?

    #44911

    Mike
    Participant
    Post count: 11

    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.

    #44920

    towhid
    Participant
    Post count: 4505

    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

    #45264

    Mike
    Participant
    Post count: 11

    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 4 posts - 1 through 4 (of 4 total)

The topic ‘PayPal Adaptive Payments – Class 'string' not found’ is closed to new replies.