You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(lune-integration): Add Lune integration custom shipping code and transaction weebhook for CO2 shipping rate estimates and creating CO2 offset orders in Lune
- a **custom shipping code** to add to the Custom Shipping Code feature on your Foxy Store Admin [Shipping Page](https://admin.foxycart.com/admin.php?ThisAction=ShippingSetup), for getting live shipping rates with CO2 offset estimates. The code is on the `custom-shipping-code.js` file under this folder.
6
+
- a **transaction webhook** to create an CO2 offset Order in Lune when a transaction is created.
7
+
8
+
## Usage
9
+
10
+
### Overview
11
+
12
+
- Sign up with Lune, and get an API key.
13
+
- Create Foxy OAuth Client Integration on the [Foxy Admin Integrations page](https://admin.foxycart.com/admin.php?ThisAction=AddIntegration), and save the credentials.
14
+
- Add the custom shipping code on your Foxy Store Admin [Shipping Page](https://admin.foxycart.com/admin.php?ThisAction=ShippingSetup), using the code on the `custom-shipping-code.js` file, filling in the data needed on the code from the OAuth client and Lune. There are other configuration variables that need data for the shipping code to work correctly, like the originAddress.
15
+
- Deploy this repository to your Netlify account.
16
+
- Set the environment variables
17
+
- Deploy the site
18
+
19
+
You will also need to configure your Lune account default project bundles, and billing info.
20
+
21
+
### Deploy this repository to Netlify
22
+
23
+
1. Click the **Fork** button at the top right corner of this page
24
+
2. Log in your Netlify account
25
+
3. Add a new site and select the **Import an existing project** option
26
+
4. Connect your GitHub account and choose your repository (the repository name should be something like `your-github-username/foxy-node-netlify-functions`)
27
+
5. In the site settings, click the **Show advanced** button
28
+
6. Under the Advanced build settings section, click the **New variable** button, yoyu will add two environment variables.
29
+
7. In the Key field, enter `LUNE_API_KEY`
30
+
8. In the Value field, enter your Lune API key
31
+
9. Deploy the site
32
+
33
+
### Create a new Foxy Weebhok
34
+
35
+
After the deploy is complete, click the "functions" tab, look for the `lune-integration` function and copy the **Endpoint URL**.
36
+
37
+
Configure your webhook using your endpoint URL.
38
+
39
+
Specify a query string value within the `API filter query string` with the following parameters:
When new upgrades to this webhook are published, you can use the GitHub Action available in the "Actions" tab in your repository to upgrade your Webhook.
50
+
51
+
- Click the "Actions" tab. Agree to use GitHub Actions.
52
+
- Click the SyncFork workflow and then "run workflow"
53
+
54
+
This will upgrade your repository.
55
+
56
+
If you've made customizations, there may be conflicts. In this case you can pull the changes and resolve the conflicts manually.
0 commit comments