payjp-react-native 0.7.0 → 0.8.1

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.
@@ -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)
@@ -23,4 +23,4 @@
23
23
  #import "RNPAY.h"
24
24
 
25
25
  NSString *const RNPAYErrorDomain = @"RNPAYErrorDomain";
26
- NSString *const RNPAYPluginVersion = @"0.7.0";
26
+ NSString *const RNPAYPluginVersion = @"0.8.1";
@@ -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 resolve
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
@@ -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
  * カードフォームを開始します。
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.7.0",
4
+ "version": "0.8.1",
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.3.3"
51
+ "typescript": "~5.6.2"
52
52
  },
53
53
  "directories": {
54
54
  "test": "test"
package/sdkconfig.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "ios": "2.0.0",
3
- "android": "2.0.0"
2
+ "ios": "2.1.1",
3
+ "android": "2.1.1"
4
4
  }
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