Skip to content

Instantly share code, notes, and snippets.

@jphungcode
Created October 21, 2020 02:57
Show Gist options
  • Save jphungcode/16076eec031244e3437bad781199ac67 to your computer and use it in GitHub Desktop.
Save jphungcode/16076eec031244e3437bad781199ac67 to your computer and use it in GitHub Desktop.
const pfcData = JSON.stringify({
Type: 2, // 1 fulfillment, 2 - ordinary
CustomerId: "107085", // 0 account ID for pfc
ChannelId: channelId,
Sender: "huangjia",
SendPhone: "0755–83727415",
SendAddress:
"4th Floor, Building C, №2, Road 1,Shangxue Science and Technology Park,Bantian street, Longgang District, Shenzhen, Guangdong Province, China",
SendCompany: "www.parcelfromchina.com",
SendEmail: "sales@pfcexpress.com",
ShipToName: data.shipping.first_name + " " + data.shipping.last_name,
ShipToPhoneNumber: data.billing.phone,
ShipToCountry: data.shipping.country,
ShipToState: data.shipping.state,
ShipToCity: data.shipping.city,
ShipToAdress1: data.shipping.address_1,
ShipToAdress2: data.shipping.address_2,
ShipToZipCode: data.shipping.postcode,
ShipToCompanyName: data.shipping.company,
OrderStatus: 1, // I've tried other values which don't work, 1 submits the order as a draft.
TrackingNo: "",
Remark: "",
BatteryFlag: 0,
INorOut: 0,
CODFee: 0,
IDCardNo: "",
CsRefNo: data.order_key, //customer reference no
WarehouseId: "302", //SZWH01深圳电商仓储中心
Products: lineItems,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment