Episodes
colleen said almost 2 years ago on Testing Stripe Payments :
Line `@payment = JSON.parse(json,object_class: OpenStruct)` returns this error: `*** TypeError Exception: no implicit conversion of Hash into String`
I copied the webhooks json directly from Stripe, so my format is 
json =
      {
        "data": {
          "object": {
            "id": "blahblah",
            "object": "checkout.session",
...
Update: If I wrap the entire json block in '' to create a string it _seems_ to work. 

David Kimura PRO said almost 2 years ago on Testing Stripe Payments :
  Glad you got it. The Stripe API does communicate back like an object which seems to be something like an OpenStruct, so that's why I went that route.

Login to Comment