@bigbinary/neeto-payments-frontend 1.4.12 → 1.4.13
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.
- package/app/javascript/src/translations/en.json +2 -1
- package/dist/index.cjs.js +39 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +39 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -344,7 +344,8 @@
|
|
|
344
344
|
"vpaText": "Send the above mentioned amount to <b>{{vpaIds}}</b> and enter the first 6 digits of the UPI transaction ID.",
|
|
345
345
|
"buttons": {
|
|
346
346
|
"submit": "Submit",
|
|
347
|
-
"back": "Back"
|
|
347
|
+
"back": "Back",
|
|
348
|
+
"markAsPaid": "Mark as paid"
|
|
348
349
|
}
|
|
349
350
|
}
|
|
350
351
|
}
|
package/dist/index.cjs.js
CHANGED
|
@@ -9309,13 +9309,50 @@ var create = function create(payload) {
|
|
|
9309
9309
|
payment: payload
|
|
9310
9310
|
});
|
|
9311
9311
|
};
|
|
9312
|
+
var update = function update(id, payload) {
|
|
9313
|
+
return axios__default["default"].put("".concat(BASE_URL, "/api/v1/upi/holdable/payments/").concat(id), {
|
|
9314
|
+
payment: payload
|
|
9315
|
+
});
|
|
9316
|
+
};
|
|
9312
9317
|
var paymentsApi = {
|
|
9313
|
-
create: create
|
|
9318
|
+
create: create,
|
|
9319
|
+
update: update
|
|
9314
9320
|
};
|
|
9315
9321
|
|
|
9316
9322
|
var useCreateUpiPayment = function useCreateUpiPayment(options) {
|
|
9317
9323
|
return reactQuery.useMutation(paymentsApi.create, options);
|
|
9318
9324
|
};
|
|
9325
|
+
var useUpdateUpiPayment = function useUpdateUpiPayment(id) {
|
|
9326
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9327
|
+
return reactQuery.useMutation(function (payload) {
|
|
9328
|
+
return paymentsApi.update(id, payload);
|
|
9329
|
+
}, options);
|
|
9330
|
+
};
|
|
9331
|
+
|
|
9332
|
+
var UpiMarkAsPaidButton = function UpiMarkAsPaidButton(_ref) {
|
|
9333
|
+
var paymentId = _ref.paymentId,
|
|
9334
|
+
payableId = _ref.payableId,
|
|
9335
|
+
_ref$onSuccess = _ref.onSuccess,
|
|
9336
|
+
onSuccess = _ref$onSuccess === void 0 ? neetoCist.noop : _ref$onSuccess;
|
|
9337
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
9338
|
+
t = _useTranslation.t;
|
|
9339
|
+
var _useUpdateUpiPayment = useUpdateUpiPayment(paymentId, {
|
|
9340
|
+
onSuccess: onSuccess
|
|
9341
|
+
}),
|
|
9342
|
+
updateUpiPayment = _useUpdateUpiPayment.mutate,
|
|
9343
|
+
isLoading = _useUpdateUpiPayment.isLoading;
|
|
9344
|
+
var handleClick = function handleClick() {
|
|
9345
|
+
return updateUpiPayment({
|
|
9346
|
+
status: "successful",
|
|
9347
|
+
payableId: payableId
|
|
9348
|
+
});
|
|
9349
|
+
};
|
|
9350
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
9351
|
+
label: t("neetoPayments.upi.payment.buttons.markAsPaid"),
|
|
9352
|
+
loading: isLoading,
|
|
9353
|
+
onClick: handleClick
|
|
9354
|
+
});
|
|
9355
|
+
};
|
|
9319
9356
|
|
|
9320
9357
|
var VALIDATION_SCHEMA = yup__namespace.object({
|
|
9321
9358
|
transactionId: yup__namespace.string().required(i18next.t("neetoPayments.upi.payment.transaction.required")).min(6, i18next.t("neetoPayments.upi.payment.transaction.sixCharacters")).max(6, i18next.t("neetoPayments.upi.payment.transaction.sixCharacters"))
|
|
@@ -9582,6 +9619,7 @@ exports.SquareCard = SquareCard;
|
|
|
9582
9619
|
exports.SquareDashboard = index;
|
|
9583
9620
|
exports.StripeConnect = StripeConnect;
|
|
9584
9621
|
exports.UpiConnect = UpiConnect;
|
|
9622
|
+
exports.UpiMarkAsPaidButton = UpiMarkAsPaidButton;
|
|
9585
9623
|
exports.UpiPayment = UpiPayment;
|
|
9586
9624
|
exports.buildStripeTransactionLink = buildStripeTransactionLink;
|
|
9587
9625
|
exports.useRazorpayPayment = useRazorpayPayment;
|