Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR #22: The requested URL returned error: 411 Length Required #33

Open
eliranm opened this issue Mar 15, 2018 · 5 comments
Open

ERROR #22: The requested URL returned error: 411 Length Required #33

eliranm opened this issue Mar 15, 2018 · 5 comments

Comments

@eliranm
Copy link

eliranm commented Mar 15, 2018

On some of the stores which install our app (not all of them), we get the following error once we try to call recurring charge activation with activate.json.

The call we make in the code is this:

      $confirm_payment = $shopify->call([
          'METHOD' => 'POST',
          'URL' => '/admin/recurring_application_charges/' . $charge_id . '/activate.json'
      ]);

Any ideas?

Thanks

@jeremynikolic
Copy link

I've looked up your issue as I plan on using this wrapper and found this post on shopify forums:
URL HERE

It is known requirement of some API requests and the solution seems to be provided at the end of the feed

@lomse
Copy link

lomse commented Mar 30, 2018

Adding 'Content-length: 0'; to the $defaultHeaders[] in the laravel-shopify-API-wrapper/src/RocketCode/Shopify/API.php seems to fix the issue.Trying to push a PR but I'm getting access denied.

@amandasaffer
Copy link

amandasaffer commented Mar 31, 2018

Also getting this error now when I try to post to the /orders/{orderID}/fulfillments/{fulfillmentId}/complete.json endpoint. Can we accept the PR for this please?

Update: I've tried to manually add the Content-length: 0 header per the documentation but it does not work. I manually edited the api.php file as @lomse suggested and that worked.

@eliranm
Copy link
Author

eliranm commented Apr 4, 2018

@amandasaffer How did you manage to make the change manually? We are referenci g it from composer, so we get the source only. Any advice will be appriciated! Thanks

@lomse
Copy link

lomse commented Apr 5, 2018

@eliranm Check the src/RocketCode/Shopify/API.php file line 223 in the vendor folder. However the issue should be fixed now. Just update your dependencies and you should be fine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants