MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
946 stars 278 forks source link

Create Order Trasactions don't work #484

Closed AlexandreSantos76 closed 3 years ago

AlexandreSantos76 commented 3 years ago

Hi, First thanks for the library, it has helped me a lot, but I found a problem or I am doing something wrong I have tried to create a new transaction but it always returns error 422 (Unprocessable Entity)

I tried to send let data={ transaction: { currency: 'BRL', amount: '24.89', kind: 'capture', parent_id: 4665713787012 } }

I have also tried

let data = JSON.stringify( { transaction: { currency: 'BRL', amount: '24.89', kind: 'capture', parent_id: 4665713787012 }})

shopify.transaction .create(order, data) .catch((err) => console.error(err));

lpinca commented 3 years ago

Use

let data = { currency: 'BRL', amount: '24.89', kind: 'capture', parent_id: 4665713787012 };

See https://github.com/MONEI/Shopify-api-node#resources.

lpinca commented 3 years ago

I'm closing this as answered.