Last active
September 21, 2017 17:04
-
-
Save mfifth/3d8b4b4e4ddc091088c7722a01f51fc8 to your computer and use it in GitHub Desktop.
This file contains 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 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