This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Host: localhost:3005 | |
| User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 | |
| Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
| Accept-Language: en-US,en;q=0.5 | |
| Accept-Encoding: gzip, deflate | |
| Access-Control-Request-Method: POST | |
| Access-Control-Request-Headers: content-type | |
| Origin: http://localhost:3000 | |
| Connection: keep-alive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let conf = { | |
| "courriers": [{ // (array) une collection d'objets représentant l'envoi | |
| "type": "colis", // (string) type d'envoi: "pli", "colis", "encombrant", "palette" | |
| "hauteur": 10, // (int) la hauteur, ne pas renseigner si le courrier est un "pli" | |
| "largeur": 11, // (int) | |
| "longueur": 12, // (int) | |
| "poids": 13, // (int) | |
| "valeur": 14 // (number) en euros | |
| }], | |
| "code_contenu": 80100, // (int) id obtenu via emc.contentsByCategory(), par exemple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {Component} from 'react'; | |
| import CarteRelais from './CarteRelais'; | |
| import RelaisList from './RelaisList'; | |
| import {view} from 'react-easy-state'; | |
| import commandeStore from './commandeStore'; | |
| class LivraisonRelais extends Component { | |
| constructor(props) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| this.props.control | |
| ? <th></th> | |
| <th></th> | |
| <th ></th> | |
| : null | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let colis = new URLSearchParams(); | |
| colis.set("expediteur.pays", "FR"); | |
| colis.set("expediteur.code_postal", "35440"); | |
| colis.set("expediteur.ville", "Feins"); | |
| colis.set("expediteur.type", "entreprise"); | |
| colis.set("expediteur.adresse", "1 rue d'aubigné"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const colis_1 = { | |
| "colis_1.poids": "8", | |
| "colis_1.longueur": "50", | |
| "colis_1.largeur": "50", | |
| "colis_1.hauteur": "55" | |
| } | |
| let recherche = new URLSearchParams(colis_1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {Component} from 'react'; | |
| import SessionCart from './SessionCart'; | |
| import Sessionlivraison from './SessionLivraison'; | |
| import SessionPaiement from './SessionPaiement'; | |
| import SessionAdresse from './SessionAdresse'; | |
| import '../App.css'; | |
| class Clients extends Component { | |
| constructor(props) { | |
| super(props); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express'); | |
| var router = express.Router(); | |
| var corsOptions = { | |
| "origin": "http://localhost:3000", | |
| "methods": "GET,HEAD,PUT,PATCH,POST,DELETE", | |
| "preflightContinue": false, | |
| "optionsSuccessStatus": 204, | |
| "credentials": true | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| connection | |
| close | |
| content-length | |
| 2 | |
| content-type | |
| application/json; charset=utf-8 | |
| date | |
| Fri, 24 May 2019 21:36:43 GMT | |
| etag | |
| W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| buy() { | |
| // Send the nonce to your server | |
| return this.instance.requestPaymentMethod() | |
| .then(({nonce}) => fetch(`/paiement/nonce/${nonce}`), { | |
| method: 'GET', | |
| credentials: 'include', | |
| }) | |
| .then(resp => resp.json()) | |
| .then(res => { | |
| console.log(res); |