Skip to content

Instantly share code, notes, and snippets.

@mfifth
Last active September 21, 2017 17:04
Show Gist options
  • Save mfifth/3d8b4b4e4ddc091088c7722a01f51fc8 to your computer and use it in GitHub Desktop.
Save mfifth/3d8b4b4e4ddc091088c7722a01f51fc8 to your computer and use it in GitHub Desktop.
var shopify = new shopifyAPI({
shop: 'kauai-project.myshopify.com', // MYSHOP.myshopify.com
shopify_api_key: 'xxxxxxxx', // Your API key
shopify_shared_secret: 'xxxxxxxxxx', // Your Shared Secret
shopify_scope: 'read_orders, write_orders, read_customers, write_customers, read_products',
redirect_uri: 'http://localhost:3000/dashboard',
});
async function send_to_shopify(billing_data) {
console.log(billing_data)
shopify.customer.create({
email: billing_data['email'],
first_name: billing_data['first_name'],
last_name: billing_data['last_name'],
addresses: [
{
address1: billing_data['address'],
address2: billing_data['addressTwo'],
city: billing_data['city'],
province: billing_data['state'],
zip: billing_data['zip']
}
]
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment