Coder Social home page Coder Social logo

Comments (12)

Andrewangeta avatar Andrewangeta commented on May 19, 2024 1

@tarikstafford 2.0.7 tag should fix the issue.

from stripe.

anagpal1990 avatar anagpal1990 commented on May 19, 2024 1

Hi @mohsinJanjua , there was a small bug in the code that i found.
If you see in Cod50298.StripeWebService.al, there is one line of code Arguments.SetRequestContent(RequestContent). Here it was called before setting Header "Content Type". So later, when If not CallWebService(Arguments) then is called, it didn't had the Content-Type set.
I also checked for API logs on stripe portal and it was sending blank JSON as request and was getting same error as mentioned above.
To fix this issue, i called Arguments.SetRequestContent(RequestContent) after adding request header.
Not sure, how it was working fine earlier but this fixed the issue for me.

Note - Above fix is required to be applied in all functions i.e CreateCustomer, UpdateCustomer, CreateSubscription etc.

image

from stripe.

Andrewangeta avatar Andrewangeta commented on May 19, 2024

What was the issue?

from stripe.

tarikstafford avatar tarikstafford commented on May 19, 2024

@Andrewangeta I still don't know. I am trying to solve it, but closed it till I do more digging.

from stripe.

tarikstafford avatar tarikstafford commented on May 19, 2024

@Andrewangeta did a fresh vapor proj to test it and it's also not working so it must be an issue with the new StripeRequest being sent to the StripeAPI.

from stripe.

tarikstafford avatar tarikstafford commented on May 19, 2024

@Andrewangeta

try body.encode(request)

this at least doesn't get an error but the content does not go through.

try request.content.encode(body, as: .urlEncodedForm)

from stripe.

Andrewangeta avatar Andrewangeta commented on May 19, 2024

@tarikstafford I know the issue. Pushing a fix now.

from stripe.

anagpal1990 avatar anagpal1990 commented on May 19, 2024

Hi Team, did we get any fix to this issue, i'm still getting same error in response from API call from Stripe.

from stripe.

anthonycastelli avatar anthonycastelli commented on May 19, 2024

@anuj-inecta What version of the provider are you running? This should of been resolved long ago.

from stripe.

anagpal1990 avatar anagpal1990 commented on May 19, 2024

Hi @anthonycastelli , thanks for revert..
Actually, we got this issue while running the App Monetization code which integrates Dynamics 365 Business Central with Stripe. Same code was working fine earlier but suddenly it started giving this error.
Lucking, after some digging yesterday, i found one bug in the code for web request call and fixed the issue.

from stripe.

mohsinJanjua avatar mohsinJanjua commented on May 19, 2024

Hi @anthonycastelli , thanks for revert..
Actually, we got this issue while running the App Monetization code which integrates Dynamics 365 Business Central with Stripe. Same code was working fine earlier but suddenly it started giving this error.
Lucking, after some digging yesterday, i found one bug in the code for web request call and fixed the issue.

Hi @anuj-inecta
I'm facing exactly same issue. the code for app monetization was working fine. then we upgraded to the October release of Business Central and it is now giving me this issue. Can you please tell me what exactly was the probelm? It will be a great help.
Thank you in advance.

from stripe.

mohsinJanjua avatar mohsinJanjua commented on May 19, 2024

Hi @mohsinJanjua , there was a small bug in the code that i found.
If you see in Cod50298.StripeWebService.al, there is one line of code Arguments.SetRequestContent(RequestContent). Here it was called before setting Header "Content Type". So later, when If not CallWebService(Arguments) then is called, it didn't had the Content-Type set.
I also checked for API logs on stripe portal and it was sending blank JSON as request and was getting same error as mentioned above.
To fix this issue, i called Arguments.SetRequestContent(RequestContent) after adding request header.
Not sure, how it was working fine earlier but this fixed the issue for me.

Note - Above fix is required to be applied in all functions i.e CreateCustomer, UpdateCustomer, CreateSubscription etc.

image

Thanks a lot, @anuj-inecta :)

from stripe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.