Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Add JavaScript code example #35

Merged
merged 2 commits into from
Mar 18, 2017
Merged

Add JavaScript code example #35

merged 2 commits into from
Mar 18, 2017

Conversation

TimvdLippe
Copy link
Contributor

Fixes the JS part of #6

@skamoen
Copy link

skamoen commented Mar 15, 2017

Could you add how to obtain (and redirect) to Mollie after the post request?

Also, thanks for removing those nasty whitespaces!

Copy link
Contributor

@martijnjanssen martijnjanssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@@ -31,23 +31,42 @@ print(response.json())
```

#### JavaScript
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a note that fetch is not supported everywhere yet?

README.md Outdated
productKeys: ['e44685c5-a360-467c-960d-29843a101bb1', '879941f4-43d1-4ff2-ad66-cbdf3b141cab']
}
});
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a print statement for the result of the request, this way the user is immediately able to see what the response contains.

README.md Outdated
});
```

Obtaining the status:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add this to the python section?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 😄

README.md Outdated

Obtaining the status:
```js
const request = await fetch('http://localhost:9000/api/orders/status/e44685c5-a360-467c-960d-29843a101bb1');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this example should use the order id from the request you have done above

@TimvdLippe
Copy link
Contributor Author

The snippet was updated according to your feedback 😄

@skamoen
Copy link

skamoen commented Mar 18, 2017

We may need to explain it in sjaars-terms, but let's leave that for a dedicated "code example" page.

@skamoen skamoen merged commit 35c8447 into master Mar 18, 2017
@skamoen skamoen deleted the code-example-javascript branch March 18, 2017 19:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants