vk-payments 0.2.30 → 0.2.31
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/bundles/vk-payments.umd.js +10 -1
- package/bundles/vk-payments.umd.js.map +1 -1
- package/bundles/vk-payments.umd.min.js +1 -1
- package/bundles/vk-payments.umd.min.js.map +1 -1
- package/esm2015/lib/bank-transfer/components/bank-transfer.component.js +11 -2
- package/esm5/lib/bank-transfer/components/bank-transfer.component.js +11 -2
- package/fesm2015/vk-payments.js +10 -1
- package/fesm2015/vk-payments.js.map +1 -1
- package/fesm5/vk-payments.js +10 -1
- package/fesm5/vk-payments.js.map +1 -1
- package/lib/bank-transfer/components/bank-transfer.component.d.ts +1 -0
- package/package.json +1 -1
- package/vk-payments.metadata.json +1 -1
|
@@ -3971,7 +3971,7 @@
|
|
|
3971
3971
|
function BankTransferComponent(bankTransferApi) {
|
|
3972
3972
|
this.bankTransferApi = bankTransferApi;
|
|
3973
3973
|
this.discountRate = 0.10; // Tasa de descuento (10% por defecto)
|
|
3974
|
-
//
|
|
3974
|
+
// Descuento explícito desde el carrito
|
|
3975
3975
|
this.statusPay = new core.EventEmitter();
|
|
3976
3976
|
this.isLoading = false;
|
|
3977
3977
|
this.errorMessage = '';
|
|
@@ -3990,6 +3990,9 @@
|
|
|
3990
3990
|
* @return {?}
|
|
3991
3991
|
*/
|
|
3992
3992
|
function () {
|
|
3993
|
+
if (this.discountAmountValue !== undefined && this.discountAmountValue !== null) {
|
|
3994
|
+
return this.amount + this.discountAmountValue;
|
|
3995
|
+
}
|
|
3993
3996
|
return this.amount ? Math.round(this.amount / (1 - this.discountRate)) : 0;
|
|
3994
3997
|
},
|
|
3995
3998
|
enumerable: true,
|
|
@@ -4000,6 +4003,9 @@
|
|
|
4000
4003
|
* @return {?}
|
|
4001
4004
|
*/
|
|
4002
4005
|
function () {
|
|
4006
|
+
if (this.discountAmountValue !== undefined && this.discountAmountValue !== null) {
|
|
4007
|
+
return this.discountAmountValue;
|
|
4008
|
+
}
|
|
4003
4009
|
return this.subtotalAmount - (this.amount || 0);
|
|
4004
4010
|
},
|
|
4005
4011
|
enumerable: true,
|
|
@@ -4143,6 +4149,7 @@
|
|
|
4143
4149
|
checkoutId: [{ type: core.Input }],
|
|
4144
4150
|
checkoutAdditionalData: [{ type: core.Input }],
|
|
4145
4151
|
discountRate: [{ type: core.Input }],
|
|
4152
|
+
discountAmountValue: [{ type: core.Input }],
|
|
4146
4153
|
statusPay: [{ type: core.Output }]
|
|
4147
4154
|
};
|
|
4148
4155
|
return BankTransferComponent;
|
|
@@ -4165,6 +4172,8 @@
|
|
|
4165
4172
|
/** @type {?} */
|
|
4166
4173
|
BankTransferComponent.prototype.discountRate;
|
|
4167
4174
|
/** @type {?} */
|
|
4175
|
+
BankTransferComponent.prototype.discountAmountValue;
|
|
4176
|
+
/** @type {?} */
|
|
4168
4177
|
BankTransferComponent.prototype.statusPay;
|
|
4169
4178
|
/** @type {?} */
|
|
4170
4179
|
BankTransferComponent.prototype.paymentForm;
|