@riocrypto/common-server 1.0.1027 → 1.0.1029

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,7 +53,7 @@ class InvopopClient {
53
53
  : `${user.firstName.toLocaleUpperCase()} ${user.lastName.toLocaleUpperCase()}`,
54
54
  tax_id: {
55
55
  country: "MX",
56
- zone: user.postalCode,
56
+ zone: user.rfc ? user.postalCode : "21000",
57
57
  code: user.rfc || "XAXX010101000",
58
58
  },
59
59
  },
@@ -100,7 +100,7 @@ class InvopopClient {
100
100
  Authorization: `Bearer ${this.apiKey}`,
101
101
  },
102
102
  });
103
- if (data.status === "ok") {
103
+ if (data.status === "OK") {
104
104
  const xmlAttachment = data.attachments.find((attachment) => attachment.mime === "text/xml; charset=utf-8");
105
105
  const pdfAttachment = data.attachments.find((attachment) => attachment.mime === "application/pdf");
106
106
  if (!xmlAttachment || !pdfAttachment) {
@@ -112,7 +112,7 @@ class InvopopClient {
112
112
  xmlUrl: xmlAttachment.url,
113
113
  };
114
114
  }
115
- else if (data.status === "ko") {
115
+ else if (data.status === "KO") {
116
116
  return {
117
117
  status: "failed",
118
118
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1027",
3
+ "version": "1.0.1029",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",