Skip to content

Instantly share code, notes, and snippets.

@jphungcode
Created October 21, 2020 02:55
Show Gist options
  • Save jphungcode/b1bccc9123054d432256f35d4210f953 to your computer and use it in GitHub Desktop.
Save jphungcode/b1bccc9123054d432256f35d4210f953 to your computer and use it in GitHub Desktop.
Start of function to post to pfc express endpoint
const pushOrder = (data) => {
return new Promise((resolve, reject) => {
if (data.status !== "processing") {
console.log("order not completed"); // we only want to push data when the order transitions to processing (paid)
reject("Order not completed");
}
// construct object for PFC
// POST data to PFC endpoint
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment