react-native-tpay 1.3.5 → 1.3.7
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/README.md +2 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/tpay/util/JsonUtil.kt +5 -0
- package/ios/Source/Configuration/TransactionConfiguration.swift +11 -11
- package/ios/Source/Model/Domain/BankPayment.swift +1 -1
- package/ios/Source/Model/Domain/BlikPayment.swift +1 -1
- package/ios/Source/Model/Domain/CardPayment.swift +1 -1
- package/ios/Source/Model/Domain/DigitalWalletPayment.swift +1 -1
- package/ios/Source/Model/Domain/PayPoPayment.swift +1 -1
- package/ios/Source/TpaySDK.swift +15 -3
- package/lib/commonjs/NativeTpay.js +9 -0
- package/lib/commonjs/NativeTpay.js.map +1 -0
- package/lib/commonjs/component/tpay_button.js +10 -7
- package/lib/commonjs/component/tpay_button.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/model/language/language.js.map +1 -1
- package/lib/commonjs/model/language/languages.js.map +1 -1
- package/lib/commonjs/model/language/localized_string.js.map +1 -1
- package/lib/commonjs/model/merchant/apple_pay_configuration.js.map +1 -1
- package/lib/commonjs/model/merchant/certificate_configuration.js.map +1 -1
- package/lib/commonjs/model/merchant/google_pay_configuration.js.map +1 -1
- package/lib/commonjs/model/merchant/merchant.js.map +1 -1
- package/lib/commonjs/model/merchant/merchant_authorization.js.map +1 -1
- package/lib/commonjs/model/merchant/merchant_details.js.map +1 -1
- package/lib/commonjs/model/merchant/tpay_environment.js.map +1 -1
- package/lib/commonjs/model/merchant/wallet_configuration.js.map +1 -1
- package/lib/commonjs/model/payer/address.js.map +1 -1
- package/lib/commonjs/model/payer/payer.js.map +1 -1
- package/lib/commonjs/model/payer/payer_context.js.map +1 -1
- package/lib/commonjs/model/payment_channel/payment_channel.js.map +1 -1
- package/lib/commonjs/model/payment_channel/payment_constraint.js.map +1 -1
- package/lib/commonjs/model/payment_channel/payment_group.js.map +1 -1
- package/lib/commonjs/model/payment_method/automatic_payment_methods.js.map +1 -1
- package/lib/commonjs/model/payment_method/blik_alias.js.map +1 -1
- package/lib/commonjs/model/payment_method/credit_card_brand.js.map +1 -1
- package/lib/commonjs/model/payment_method/digital_wallet.js.map +1 -1
- package/lib/commonjs/model/payment_method/installment_payment.js.map +1 -1
- package/lib/commonjs/model/payment_method/payment_method.js.map +1 -1
- package/lib/commonjs/model/payment_method/payment_methods.js.map +1 -1
- package/lib/commonjs/model/payment_method/tokenized_card.js.map +1 -1
- package/lib/commonjs/model/result/google_pay_configure_result.js +4 -1
- package/lib/commonjs/model/result/google_pay_configure_result.js.map +1 -1
- package/lib/commonjs/model/result/google_pay_open_result.js +10 -3
- package/lib/commonjs/model/result/google_pay_open_result.js.map +1 -1
- package/lib/commonjs/model/result/payment_channels_result.js +2 -0
- package/lib/commonjs/model/result/payment_channels_result.js.map +1 -1
- package/lib/commonjs/model/result/result.js +17 -4
- package/lib/commonjs/model/result/result.js.map +1 -1
- package/lib/commonjs/model/result/screenless_result.js +7 -0
- package/lib/commonjs/model/result/screenless_result.js.map +1 -1
- package/lib/commonjs/model/screenless/ambiguous_alias.js.map +1 -1
- package/lib/commonjs/model/screenless/ambiguous_blik_payment.js.map +1 -1
- package/lib/commonjs/model/screenless/apple_pay_payment.js.map +1 -1
- package/lib/commonjs/model/screenless/blik_payment.js.map +1 -1
- package/lib/commonjs/model/screenless/callbacks.js.map +1 -1
- package/lib/commonjs/model/screenless/credit_card.js.map +1 -1
- package/lib/commonjs/model/screenless/credit_card_config.js.map +1 -1
- package/lib/commonjs/model/screenless/credit_card_payment.js.map +1 -1
- package/lib/commonjs/model/screenless/expiration_date.js.map +1 -1
- package/lib/commonjs/model/screenless/frequency.js.map +1 -1
- package/lib/commonjs/model/screenless/google_pay_environment.js.map +1 -1
- package/lib/commonjs/model/screenless/google_pay_payment.js.map +1 -1
- package/lib/commonjs/model/screenless/google_pay_utils_configuration.js.map +1 -1
- package/lib/commonjs/model/screenless/notifications.js.map +1 -1
- package/lib/commonjs/model/screenless/pay_po_payment.js.map +1 -1
- package/lib/commonjs/model/screenless/payment_details.js.map +1 -1
- package/lib/commonjs/model/screenless/raty_pekao_payment.js.map +1 -1
- package/lib/commonjs/model/screenless/recursive.js.map +1 -1
- package/lib/commonjs/model/screenless/redirects.js.map +1 -1
- package/lib/commonjs/model/screenless/screenless_payment.js.map +1 -1
- package/lib/commonjs/model/screenless/transfer_payment.js.map +1 -1
- package/lib/commonjs/model/tokenization/tokenization.js.map +1 -1
- package/lib/commonjs/model/tpay_configuration.js.map +1 -1
- package/lib/commonjs/model/transaction/single_transaction.js +3 -2
- package/lib/commonjs/model/transaction/single_transaction.js.map +1 -1
- package/lib/commonjs/model/transaction/token_payment.js +3 -2
- package/lib/commonjs/model/transaction/token_payment.js.map +1 -1
- package/lib/commonjs/model/transaction/transaction.js +3 -1
- package/lib/commonjs/model/transaction/transaction.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/util/google_pay_configuration_util.js.map +1 -1
- package/lib/commonjs/util/google_pay_open_util.js.map +1 -1
- package/lib/commonjs/util/payment_channels_util.js.map +1 -1
- package/lib/commonjs/util/result_util.js.map +1 -1
- package/lib/commonjs/util/screenless_result_util.js.map +1 -1
- package/lib/module/NativeTpay.js +5 -0
- package/lib/module/NativeTpay.js.map +1 -0
- package/lib/module/component/tpay_button.js +12 -7
- package/lib/module/component/tpay_button.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/model/language/language.js +2 -0
- package/lib/module/model/language/language.js.map +1 -1
- package/lib/module/model/language/languages.js +2 -0
- package/lib/module/model/language/languages.js.map +1 -1
- package/lib/module/model/language/localized_string.js +2 -0
- package/lib/module/model/language/localized_string.js.map +1 -1
- package/lib/module/model/merchant/apple_pay_configuration.js +2 -0
- package/lib/module/model/merchant/apple_pay_configuration.js.map +1 -1
- package/lib/module/model/merchant/certificate_configuration.js +2 -0
- package/lib/module/model/merchant/certificate_configuration.js.map +1 -1
- package/lib/module/model/merchant/google_pay_configuration.js +2 -0
- package/lib/module/model/merchant/google_pay_configuration.js.map +1 -1
- package/lib/module/model/merchant/merchant.js +2 -0
- package/lib/module/model/merchant/merchant.js.map +1 -1
- package/lib/module/model/merchant/merchant_authorization.js +2 -0
- package/lib/module/model/merchant/merchant_authorization.js.map +1 -1
- package/lib/module/model/merchant/merchant_details.js +2 -0
- package/lib/module/model/merchant/merchant_details.js.map +1 -1
- package/lib/module/model/merchant/tpay_environment.js +2 -0
- package/lib/module/model/merchant/tpay_environment.js.map +1 -1
- package/lib/module/model/merchant/wallet_configuration.js +2 -0
- package/lib/module/model/merchant/wallet_configuration.js.map +1 -1
- package/lib/module/model/payer/address.js +2 -0
- package/lib/module/model/payer/address.js.map +1 -1
- package/lib/module/model/payer/payer.js +2 -0
- package/lib/module/model/payer/payer.js.map +1 -1
- package/lib/module/model/payer/payer_context.js +2 -0
- package/lib/module/model/payer/payer_context.js.map +1 -1
- package/lib/module/model/payment_channel/payment_channel.js +2 -0
- package/lib/module/model/payment_channel/payment_channel.js.map +1 -1
- package/lib/module/model/payment_channel/payment_constraint.js +2 -0
- package/lib/module/model/payment_channel/payment_constraint.js.map +1 -1
- package/lib/module/model/payment_channel/payment_group.js +2 -0
- package/lib/module/model/payment_channel/payment_group.js.map +1 -1
- package/lib/module/model/payment_method/automatic_payment_methods.js +2 -0
- package/lib/module/model/payment_method/automatic_payment_methods.js.map +1 -1
- package/lib/module/model/payment_method/blik_alias.js +2 -0
- package/lib/module/model/payment_method/blik_alias.js.map +1 -1
- package/lib/module/model/payment_method/credit_card_brand.js +2 -0
- package/lib/module/model/payment_method/credit_card_brand.js.map +1 -1
- package/lib/module/model/payment_method/digital_wallet.js +2 -0
- package/lib/module/model/payment_method/digital_wallet.js.map +1 -1
- package/lib/module/model/payment_method/installment_payment.js +2 -0
- package/lib/module/model/payment_method/installment_payment.js.map +1 -1
- package/lib/module/model/payment_method/payment_method.js +2 -0
- package/lib/module/model/payment_method/payment_method.js.map +1 -1
- package/lib/module/model/payment_method/payment_methods.js +2 -0
- package/lib/module/model/payment_method/payment_methods.js.map +1 -1
- package/lib/module/model/payment_method/tokenized_card.js +2 -0
- package/lib/module/model/payment_method/tokenized_card.js.map +1 -1
- package/lib/module/model/result/google_pay_configure_result.js +6 -1
- package/lib/module/model/result/google_pay_configure_result.js.map +1 -1
- package/lib/module/model/result/google_pay_open_result.js +12 -3
- package/lib/module/model/result/google_pay_open_result.js.map +1 -1
- package/lib/module/model/result/payment_channels_result.js +4 -0
- package/lib/module/model/result/payment_channels_result.js.map +1 -1
- package/lib/module/model/result/result.js +19 -4
- package/lib/module/model/result/result.js.map +1 -1
- package/lib/module/model/result/screenless_result.js +9 -0
- package/lib/module/model/result/screenless_result.js.map +1 -1
- package/lib/module/model/screenless/ambiguous_alias.js +2 -0
- package/lib/module/model/screenless/ambiguous_alias.js.map +1 -1
- package/lib/module/model/screenless/ambiguous_blik_payment.js +2 -0
- package/lib/module/model/screenless/ambiguous_blik_payment.js.map +1 -1
- package/lib/module/model/screenless/apple_pay_payment.js +2 -0
- package/lib/module/model/screenless/apple_pay_payment.js.map +1 -1
- package/lib/module/model/screenless/blik_payment.js +2 -0
- package/lib/module/model/screenless/blik_payment.js.map +1 -1
- package/lib/module/model/screenless/callbacks.js +2 -0
- package/lib/module/model/screenless/callbacks.js.map +1 -1
- package/lib/module/model/screenless/credit_card.js +2 -0
- package/lib/module/model/screenless/credit_card.js.map +1 -1
- package/lib/module/model/screenless/credit_card_config.js +2 -0
- package/lib/module/model/screenless/credit_card_config.js.map +1 -1
- package/lib/module/model/screenless/credit_card_payment.js +2 -0
- package/lib/module/model/screenless/credit_card_payment.js.map +1 -1
- package/lib/module/model/screenless/expiration_date.js +2 -0
- package/lib/module/model/screenless/expiration_date.js.map +1 -1
- package/lib/module/model/screenless/frequency.js +2 -0
- package/lib/module/model/screenless/frequency.js.map +1 -1
- package/lib/module/model/screenless/google_pay_environment.js +2 -0
- package/lib/module/model/screenless/google_pay_environment.js.map +1 -1
- package/lib/module/model/screenless/google_pay_payment.js +2 -0
- package/lib/module/model/screenless/google_pay_payment.js.map +1 -1
- package/lib/module/model/screenless/google_pay_utils_configuration.js +2 -0
- package/lib/module/model/screenless/google_pay_utils_configuration.js.map +1 -1
- package/lib/module/model/screenless/notifications.js +2 -0
- package/lib/module/model/screenless/notifications.js.map +1 -1
- package/lib/module/model/screenless/pay_po_payment.js +2 -0
- package/lib/module/model/screenless/pay_po_payment.js.map +1 -1
- package/lib/module/model/screenless/payment_details.js +2 -0
- package/lib/module/model/screenless/payment_details.js.map +1 -1
- package/lib/module/model/screenless/raty_pekao_payment.js +2 -0
- package/lib/module/model/screenless/raty_pekao_payment.js.map +1 -1
- package/lib/module/model/screenless/recursive.js +2 -0
- package/lib/module/model/screenless/recursive.js.map +1 -1
- package/lib/module/model/screenless/redirects.js +2 -0
- package/lib/module/model/screenless/redirects.js.map +1 -1
- package/lib/module/model/screenless/screenless_payment.js +2 -0
- package/lib/module/model/screenless/screenless_payment.js.map +1 -1
- package/lib/module/model/screenless/transfer_payment.js +2 -0
- package/lib/module/model/screenless/transfer_payment.js.map +1 -1
- package/lib/module/model/tokenization/tokenization.js +2 -0
- package/lib/module/model/tokenization/tokenization.js.map +1 -1
- package/lib/module/model/tpay_configuration.js +2 -0
- package/lib/module/model/tpay_configuration.js.map +1 -1
- package/lib/module/model/transaction/single_transaction.js +5 -2
- package/lib/module/model/transaction/single_transaction.js.map +1 -1
- package/lib/module/model/transaction/token_payment.js +5 -2
- package/lib/module/model/transaction/token_payment.js.map +1 -1
- package/lib/module/model/transaction/transaction.js +5 -1
- package/lib/module/model/transaction/transaction.js.map +1 -1
- package/lib/module/util/google_pay_configuration_util.js +2 -0
- package/lib/module/util/google_pay_configuration_util.js.map +1 -1
- package/lib/module/util/google_pay_open_util.js +2 -0
- package/lib/module/util/google_pay_open_util.js.map +1 -1
- package/lib/module/util/payment_channels_util.js +2 -0
- package/lib/module/util/payment_channels_util.js.map +1 -1
- package/lib/module/util/result_util.js +2 -0
- package/lib/module/util/result_util.js.map +1 -1
- package/lib/module/util/screenless_result_util.js +2 -0
- package/lib/module/util/screenless_result_util.js.map +1 -1
- package/lib/typescript/src/NativeTpay.d.ts +22 -0
- package/lib/typescript/src/NativeTpay.d.ts.map +1 -0
- package/lib/typescript/src/component/tpay_button.d.ts +1 -2
- package/lib/typescript/src/component/tpay_button.d.ts.map +1 -1
- package/lib/typescript/src/model/result/google_pay_configure_result.d.ts +11 -1
- package/lib/typescript/src/model/result/google_pay_configure_result.d.ts.map +1 -1
- package/lib/typescript/src/model/result/google_pay_open_result.d.ts +25 -1
- package/lib/typescript/src/model/result/google_pay_open_result.d.ts.map +1 -1
- package/lib/typescript/src/model/result/payment_channels_result.d.ts +15 -1
- package/lib/typescript/src/model/result/payment_channels_result.d.ts.map +1 -1
- package/lib/typescript/src/model/result/result.d.ts +26 -1
- package/lib/typescript/src/model/result/result.d.ts.map +1 -1
- package/lib/typescript/src/model/result/screenless_result.d.ts +32 -1
- package/lib/typescript/src/model/result/screenless_result.d.ts.map +1 -1
- package/lib/typescript/src/model/transaction/single_transaction.d.ts +2 -1
- package/lib/typescript/src/model/transaction/single_transaction.d.ts.map +1 -1
- package/lib/typescript/src/model/transaction/token_payment.d.ts +2 -1
- package/lib/typescript/src/model/transaction/token_payment.d.ts.map +1 -1
- package/lib/typescript/src/model/transaction/transaction.d.ts +3 -1
- package/lib/typescript/src/model/transaction/transaction.d.ts.map +1 -1
- package/package.json +34 -26
- package/src/NativeTpay.ts +33 -0
- package/src/model/result/google_pay_configure_result.ts +15 -2
- package/src/model/result/google_pay_open_result.ts +36 -4
- package/src/model/result/payment_channels_result.ts +18 -1
- package/src/model/result/result.ts +38 -5
- package/src/model/result/screenless_result.ts +38 -1
- package/src/model/transaction/single_transaction.ts +3 -1
- package/src/model/transaction/token_payment.ts +3 -1
- package/src/model/transaction/transaction.ts +4 -0
|
@@ -1,32 +1,61 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Indicates a result of Tpay UI module action
|
|
3
3
|
*/
|
|
4
|
-
export class Result {
|
|
4
|
+
export abstract class Result {
|
|
5
|
+
/**
|
|
6
|
+
* Type identifier for the result
|
|
7
|
+
*/
|
|
8
|
+
abstract readonly type: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Optional error message or additional information
|
|
12
|
+
*/
|
|
13
|
+
message?: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Transaction ID when applicable
|
|
17
|
+
*/
|
|
18
|
+
transactionId?: string | null;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Payment URL for continuation (used in screenless payments)
|
|
22
|
+
*/
|
|
23
|
+
paymentUrl?: string;
|
|
24
|
+
}
|
|
5
25
|
|
|
6
26
|
/**
|
|
7
27
|
* Indicates that credit card tokenization was successful and module was closed
|
|
8
28
|
*/
|
|
9
|
-
export class TokenizationCompleted extends Result {
|
|
29
|
+
export class TokenizationCompleted extends Result {
|
|
30
|
+
readonly type = 'tokenizationCompleted';
|
|
31
|
+
}
|
|
10
32
|
|
|
11
33
|
/**
|
|
12
34
|
* Indicates that credit card tokenization failed and module was closed
|
|
13
35
|
*/
|
|
14
|
-
export class TokenizationFailure extends Result {
|
|
36
|
+
export class TokenizationFailure extends Result {
|
|
37
|
+
readonly type = 'tokenizationFailure';
|
|
38
|
+
}
|
|
15
39
|
|
|
16
40
|
/**
|
|
17
41
|
* Indicates that configuration was successful
|
|
18
42
|
*/
|
|
19
|
-
export class ConfigurationSuccess extends Result {
|
|
43
|
+
export class ConfigurationSuccess extends Result {
|
|
44
|
+
readonly type = 'configurationSuccess';
|
|
45
|
+
}
|
|
20
46
|
|
|
21
47
|
/**
|
|
22
48
|
* Indicates that user closed the module without making a payment/tokenization
|
|
23
49
|
*/
|
|
24
|
-
export class ModuleClosed extends Result {
|
|
50
|
+
export class ModuleClosed extends Result {
|
|
51
|
+
readonly type = 'moduleClosed';
|
|
52
|
+
}
|
|
25
53
|
|
|
26
54
|
/**
|
|
27
55
|
* Indicates that some data passed to module is invalid
|
|
28
56
|
*/
|
|
29
57
|
export class ValidationError extends Result {
|
|
58
|
+
readonly type = 'validationError';
|
|
30
59
|
/**
|
|
31
60
|
* Validation error message
|
|
32
61
|
*/
|
|
@@ -42,6 +71,7 @@ export class ValidationError extends Result {
|
|
|
42
71
|
* Indicates that payment was successfully created
|
|
43
72
|
*/
|
|
44
73
|
export class PaymentCreated extends Result {
|
|
74
|
+
readonly type = 'paymentCreated';
|
|
45
75
|
/**
|
|
46
76
|
* Transaction id of the created transaction
|
|
47
77
|
*/
|
|
@@ -57,6 +87,7 @@ export class PaymentCreated extends Result {
|
|
|
57
87
|
* Indicates that payment was successful and module was closed
|
|
58
88
|
*/
|
|
59
89
|
export class PaymentCompleted extends Result {
|
|
90
|
+
readonly type = 'paymentCompleted';
|
|
60
91
|
/**
|
|
61
92
|
* Transaction id of the completed transaction
|
|
62
93
|
*/
|
|
@@ -72,6 +103,7 @@ export class PaymentCompleted extends Result {
|
|
|
72
103
|
* Indicates that payment failed and module was closed
|
|
73
104
|
*/
|
|
74
105
|
export class PaymentCancelled extends Result {
|
|
106
|
+
readonly type = 'paymentCancelled';
|
|
75
107
|
/**
|
|
76
108
|
* If exists, id of the transaction
|
|
77
109
|
*/
|
|
@@ -87,6 +119,7 @@ export class PaymentCancelled extends Result {
|
|
|
87
119
|
* Indicates a module error
|
|
88
120
|
*/
|
|
89
121
|
export class MethodCallError extends Result {
|
|
122
|
+
readonly type = 'methodCallError';
|
|
90
123
|
/**
|
|
91
124
|
* Error message
|
|
92
125
|
*/
|
|
@@ -3,12 +3,43 @@ import { AmbiguousAlias } from 'react-native-tpay';
|
|
|
3
3
|
/**
|
|
4
4
|
* Indicates a result of screenless action
|
|
5
5
|
*/
|
|
6
|
-
export class ScreenlessResult {
|
|
6
|
+
export abstract class ScreenlessResult {
|
|
7
|
+
/**
|
|
8
|
+
* Type identifier for the result
|
|
9
|
+
*/
|
|
10
|
+
abstract readonly type: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Optional error message or additional information
|
|
14
|
+
*/
|
|
15
|
+
message?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Transaction ID when applicable
|
|
19
|
+
*/
|
|
20
|
+
transactionId?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Payment URL for continuation when applicable
|
|
24
|
+
*/
|
|
25
|
+
paymentUrl?: string | null;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Error message when applicable
|
|
29
|
+
*/
|
|
30
|
+
error?: string | null;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Ambiguous aliases for BLIK payments when applicable
|
|
34
|
+
*/
|
|
35
|
+
aliases?: Array<AmbiguousAlias>;
|
|
36
|
+
}
|
|
7
37
|
|
|
8
38
|
/**
|
|
9
39
|
* Indicates that some data passed to payment is invalid
|
|
10
40
|
*/
|
|
11
41
|
export class ScreenlessValidationError extends ScreenlessResult {
|
|
42
|
+
readonly type = 'validationError';
|
|
12
43
|
/**
|
|
13
44
|
* Validation error message
|
|
14
45
|
*/
|
|
@@ -24,6 +55,7 @@ export class ScreenlessValidationError extends ScreenlessResult {
|
|
|
24
55
|
* Indicates a module error
|
|
25
56
|
*/
|
|
26
57
|
export class ScreenlessMethodCallError extends ScreenlessResult {
|
|
58
|
+
readonly type = 'methodCallError';
|
|
27
59
|
/**
|
|
28
60
|
* Error message
|
|
29
61
|
*/
|
|
@@ -39,6 +71,7 @@ export class ScreenlessMethodCallError extends ScreenlessResult {
|
|
|
39
71
|
* Indicates that payment was completed successfully
|
|
40
72
|
*/
|
|
41
73
|
export class ScreenlessPaid extends ScreenlessResult {
|
|
74
|
+
readonly type = 'paid';
|
|
42
75
|
/**
|
|
43
76
|
* Transaction id of the completed transaction
|
|
44
77
|
*/
|
|
@@ -59,6 +92,7 @@ export class ScreenlessPaid extends ScreenlessResult {
|
|
|
59
92
|
* payment status via transactionId.
|
|
60
93
|
*/
|
|
61
94
|
export class ScreenlessPaymentCreated extends ScreenlessResult {
|
|
95
|
+
readonly type = 'paymentCreated';
|
|
62
96
|
/**
|
|
63
97
|
* Transaction id of the created transaction
|
|
64
98
|
*/
|
|
@@ -82,6 +116,7 @@ export class ScreenlessPaymentCreated extends ScreenlessResult {
|
|
|
82
116
|
* - BLIK code or BLIK alias
|
|
83
117
|
*/
|
|
84
118
|
export class ScreenlessConfiguredPaymentFailed extends ScreenlessResult {
|
|
119
|
+
readonly type = 'configuredPaymentFailed';
|
|
85
120
|
/**
|
|
86
121
|
* Transaction id of the created transaction
|
|
87
122
|
*/
|
|
@@ -105,6 +140,7 @@ export class ScreenlessConfiguredPaymentFailed extends ScreenlessResult {
|
|
|
105
140
|
* continue the payment.
|
|
106
141
|
*/
|
|
107
142
|
export class ScreenlessBlikAmbiguousAlias extends ScreenlessResult {
|
|
143
|
+
readonly type = 'ambiguousAlias';
|
|
108
144
|
/**
|
|
109
145
|
* Transaction id of the created transaction
|
|
110
146
|
*/
|
|
@@ -126,6 +162,7 @@ export class ScreenlessBlikAmbiguousAlias extends ScreenlessResult {
|
|
|
126
162
|
* Indicates that payment was not created because of an error
|
|
127
163
|
*/
|
|
128
164
|
export class ScreenlessPaymentError extends ScreenlessResult {
|
|
165
|
+
readonly type = 'error';
|
|
129
166
|
/**
|
|
130
167
|
* Optional error message
|
|
131
168
|
*/
|
|
@@ -12,15 +12,17 @@ export class SingleTransaction extends Transaction {
|
|
|
12
12
|
* @param payerContext - information about payer and automatic payment methods
|
|
13
13
|
* @param amount - amount of money payer has to pay
|
|
14
14
|
* @param description - description of payment shown to payer
|
|
15
|
+
* @param hiddenDescription - description of payment shown to merchant
|
|
15
16
|
* @param notifications - payment notification url and email
|
|
16
17
|
*/
|
|
17
18
|
constructor(
|
|
18
19
|
payerContext: PayerContext,
|
|
19
20
|
amount: number,
|
|
20
21
|
description: string,
|
|
22
|
+
hiddenDescription: string | null,
|
|
21
23
|
notifications: Notifications | null
|
|
22
24
|
) {
|
|
23
|
-
super(amount, description, notifications);
|
|
25
|
+
super(amount, description, hiddenDescription, notifications);
|
|
24
26
|
this.payerContext = payerContext;
|
|
25
27
|
}
|
|
26
28
|
}
|
|
@@ -14,6 +14,7 @@ export class TokenPayment extends Transaction {
|
|
|
14
14
|
* @param payer - payer information
|
|
15
15
|
* @param amount - amount of money payer has to pay
|
|
16
16
|
* @param description - description of payment shown to payer
|
|
17
|
+
* @param hiddenDescription - description of payment shown to merchant
|
|
17
18
|
* @param notifications - payment notification url and email
|
|
18
19
|
*/
|
|
19
20
|
constructor(
|
|
@@ -21,9 +22,10 @@ export class TokenPayment extends Transaction {
|
|
|
21
22
|
payer: Payer,
|
|
22
23
|
amount: number,
|
|
23
24
|
description: string,
|
|
25
|
+
hiddenDescription: string | null,
|
|
24
26
|
notifications: Notifications | null
|
|
25
27
|
) {
|
|
26
|
-
super(amount, description, notifications);
|
|
28
|
+
super(amount, description, hiddenDescription, notifications);
|
|
27
29
|
this.cardToken = cardToken;
|
|
28
30
|
this.payer = payer;
|
|
29
31
|
}
|
|
@@ -6,20 +6,24 @@ import type { Notifications } from "../screenless/notifications";
|
|
|
6
6
|
export class Transaction {
|
|
7
7
|
amount: number;
|
|
8
8
|
description: string;
|
|
9
|
+
hiddenDescription: string | null;
|
|
9
10
|
notifications: Notifications | null;
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* @param amount - amount of money payer has to pay
|
|
13
14
|
* @param description - description of payment shown to payer
|
|
15
|
+
* @param hiddenDescription - description of payment shown to merchant
|
|
14
16
|
* @param notifications - payment notification url and email
|
|
15
17
|
*/
|
|
16
18
|
constructor(
|
|
17
19
|
amount: number,
|
|
18
20
|
description: string,
|
|
21
|
+
hiddenDescription: string | null,
|
|
19
22
|
notifications: Notifications | null
|
|
20
23
|
) {
|
|
21
24
|
this.amount = amount;
|
|
22
25
|
this.description = description;
|
|
26
|
+
this.hiddenDescription = hiddenDescription;
|
|
23
27
|
this.notifications = notifications;
|
|
24
28
|
}
|
|
25
29
|
}
|