@achyutlabsau/vue-payment-gateway 0.2.10 → 0.2.12

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.
Files changed (2) hide show
  1. package/dist/mx51.js +9 -1
  2. package/package.json +1 -1
package/dist/mx51.js CHANGED
@@ -15,6 +15,7 @@ async function pair(pairingInput) {
15
15
  if (pairingInput.autoAddressResolution) {
16
16
  const res = await spi.GetTerminalAddress();
17
17
  if (!res) return false;
18
+ spi.SetEftposAddress(res);
18
19
  }
19
20
  log("Pairing...");
20
21
  return spi.Pair();
@@ -91,6 +92,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
91
92
  const resetPairForm = () => {
92
93
  localStorage.removeItem("pairingData");
93
94
  localStorage.removeItem("eftposAddress");
95
+ selectedTenant.value = "";
94
96
  pairForm.value = {
95
97
  posId: "",
96
98
  serialNumber: "",
@@ -103,6 +105,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
103
105
  };
104
106
  const onPairTerminal = async () => {
105
107
  model.value = true;
108
+ pairInfo.value.state = "INPROGRESS";
109
+ pairInfo.value.message = "Connecting...";
106
110
  const isPairingStarted = await pair(pairForm.value);
107
111
  if (!isPairingStarted) {
108
112
  pairInfo.value.state = "FINISHED";
@@ -118,6 +122,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
118
122
  });
119
123
  };
120
124
  onMounted(async () => {
125
+ pairForm.value.posId = "T1";
126
+ pairForm.value.serialNumber = "500-099-001";
121
127
  const res = await getTenants(state.productVendorName, state.mx51DeviceApiKey);
122
128
  if (res) {
123
129
  tenants.value = res;
@@ -199,7 +205,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
199
205
  "option-value": "code",
200
206
  "option-label": "name",
201
207
  "emit-value": "",
202
- rules: [(v) => !!v || "Please select Payment Provider"]
208
+ rules: [(v) => !!v || "Please select Payment Provider"],
209
+ hint: "Select payment provider"
203
210
  }, null, 8, ["disable", "modelValue", "options", "rules"]),
204
211
  createVNode(unref(QInput), {
205
212
  "no-error-icon": "",
@@ -228,6 +235,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
228
235
  modelValue: pairForm.value.posId,
229
236
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => pairForm.value.posId = $event),
230
237
  label: "POS ID",
238
+ hint: "Enter the POS Id to identify this Device",
231
239
  rules: [
232
240
  (v) => !!v || "POS ID is required",
233
241
  (val) => isAlphanumeric(val) || "Pos ID must contain only alphanumeric characters",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@achyutlabsau/vue-payment-gateway",
3
3
  "private": false,
4
- "version": "0.2.10",
4
+ "version": "0.2.12",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",