payjp-react-native 0.7.0 → 0.8.0
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/android/src/main/java/jp/pay/reactnative/PayjpCardFormModule.kt +2 -0
- package/ios/Classes/RNPAY.m +1 -1
- package/ios/Classes/RNPAYCardForm.m +4 -2
- package/lib/CardForm.d.ts +4 -0
- package/lib/CardForm.js +1 -1
- package/package.json +2 -2
- package/sdkconfig.json +2 -2
- package/src/CardForm.ts +5 -0
|
@@ -77,6 +77,7 @@ class PayjpCardFormModule(
|
|
|
77
77
|
extraAttributeEmailPreset: String?,
|
|
78
78
|
extraAttributePhoneRegion: String?,
|
|
79
79
|
extraAttributePhoneNumber: String?,
|
|
80
|
+
useThreeDSecure: Boolean,
|
|
80
81
|
promise: Promise
|
|
81
82
|
) {
|
|
82
83
|
val face = when (cardFormType) {
|
|
@@ -101,6 +102,7 @@ class PayjpCardFormModule(
|
|
|
101
102
|
tenant = tenantId,
|
|
102
103
|
face = face,
|
|
103
104
|
extraAttributes = extraAttributes,
|
|
105
|
+
useThreeDSecure = useThreeDSecure,
|
|
104
106
|
)
|
|
105
107
|
}
|
|
106
108
|
promise.resolve(null)
|
package/ios/Classes/RNPAY.m
CHANGED
|
@@ -52,7 +52,8 @@ RCT_EXPORT_METHOD(startCardForm
|
|
|
52
52
|
: (BOOL)extraAttributePhoneEnabled extraAttributeEmail
|
|
53
53
|
: (NSString *)extraAttributeEmail extraAttributePhoneRegion
|
|
54
54
|
: (NSString *)extraAttributePhoneRegion extraAttributePhoneNumber
|
|
55
|
-
: (NSString *)extraAttributePhoneNumber
|
|
55
|
+
: (NSString *)extraAttributePhoneNumber useThreeDSecure
|
|
56
|
+
: (BOOL)useThreeDSecure resolve
|
|
56
57
|
: (RCTPromiseResolveBlock)resolve reject
|
|
57
58
|
: (__unused RCTPromiseRejectBlock)reject) {
|
|
58
59
|
NSString *description =
|
|
@@ -83,7 +84,8 @@ RCT_EXPORT_METHOD(startCardForm
|
|
|
83
84
|
tenantId:tenantId
|
|
84
85
|
delegate:wself
|
|
85
86
|
viewType:viewType
|
|
86
|
-
extraAttributes:extraAttributes
|
|
87
|
+
extraAttributes:extraAttributes
|
|
88
|
+
useThreeDSecure:useThreeDSecure];
|
|
87
89
|
UIViewController *hostViewController =
|
|
88
90
|
UIApplication.sharedApplication.keyWindow.rootViewController;
|
|
89
91
|
if ([hostViewController isKindOfClass:[UINavigationController class]]) {
|
package/lib/CardForm.d.ts
CHANGED
package/lib/CardForm.js
CHANGED
|
@@ -15,7 +15,7 @@ export const startCardForm = async (options) => {
|
|
|
15
15
|
const extraAttributes = options?.extraAttributes ?? [{ type: 'email' }, { type: 'phone' }];
|
|
16
16
|
const extraAttributeEmail = extraAttributes.find(attribute => attribute.type === 'email');
|
|
17
17
|
const extraAttributePhone = extraAttributes.find(attribute => attribute.type === 'phone');
|
|
18
|
-
await RNPAYCardForm.startCardForm(options?.tenantId, options?.cardFormType, !!extraAttributeEmail, !!extraAttributePhone, extraAttributeEmail?.preset, extraAttributePhone?.presetRegion, extraAttributePhone?.presetNumber);
|
|
18
|
+
await RNPAYCardForm.startCardForm(options?.tenantId, options?.cardFormType, !!extraAttributeEmail, !!extraAttributePhone, extraAttributeEmail?.preset, extraAttributePhone?.presetRegion, extraAttributePhone?.presetNumber, options?.useThreeDSecure ?? false);
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* カードフォーム画面を閉じます。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payjp-react-native",
|
|
3
3
|
"description": "A React Native plugin for PAY.JP SDK",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "PAY.JP",
|
|
7
7
|
"email": "support@pay.jp",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react-test-renderer": "18.2.0",
|
|
49
49
|
"rimraf": "^6.0.1",
|
|
50
50
|
"typedoc": "^0.26.6",
|
|
51
|
-
"typescript": "~5.
|
|
51
|
+
"typescript": "~5.6.2"
|
|
52
52
|
},
|
|
53
53
|
"directories": {
|
|
54
54
|
"test": "test"
|
package/sdkconfig.json
CHANGED
package/src/CardForm.ts
CHANGED
|
@@ -63,6 +63,10 @@ type CardFormOption = {
|
|
|
63
63
|
* https://help.pay.jp/ja/articles/9556161
|
|
64
64
|
*/
|
|
65
65
|
extraAttributes?: ExtraAttribute[];
|
|
66
|
+
/**
|
|
67
|
+
* 3-D セキュア認証の実施可否を設定します。デフォルトはfalseです。
|
|
68
|
+
*/
|
|
69
|
+
useThreeDSecure?: boolean;
|
|
66
70
|
};
|
|
67
71
|
|
|
68
72
|
const { RNPAYCardForm } = NativeModules;
|
|
@@ -89,6 +93,7 @@ export const startCardForm = async (options?: CardFormOption): Promise<void> =>
|
|
|
89
93
|
extraAttributeEmail?.preset,
|
|
90
94
|
extraAttributePhone?.presetRegion,
|
|
91
95
|
extraAttributePhone?.presetNumber,
|
|
96
|
+
options?.useThreeDSecure ?? false,
|
|
92
97
|
);
|
|
93
98
|
};
|
|
94
99
|
|