Skip to content

Commit 29fc0ac

Browse files
committed
API review suggestions
1 parent 4c2549f commit 29fc0ac

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ fun EmbeddedPaymentElement.PaymentOptionDisplayData.toWritableMap(): WritableMap
1818

1919
val mandateTextHTML = mandateText?.toHtmlString()
2020
if (mandateTextHTML != null) {
21-
putString("mandateText", mandateTextHTML)
21+
putString("mandateHTML", mandateTextHTML)
2222
} else {
23-
putNull("mandateText")
23+
putNull("mandateHTML")
2424
}
2525
}
2626

ios/PaymentOptionDisplayData+ReactNative.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ extension EmbeddedPaymentElement.PaymentOptionDisplayData {
6969
"label": label,
7070
"billingDetails": billingDetailsDict,
7171
"paymentMethodType": paymentMethodType,
72-
"mandateText": mandateTextHTML
72+
"mandateHTML": mandateTextHTML
7373
]
7474
}
7575
}

src/types/EmbeddedPaymentElement.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export interface PaymentOptionDisplayData {
6767
* If you set `configuration.embeddedViewDisplaysMandateText = false`, this HTML text must be displayed to the customer near your "Buy" button to comply with regulations.
6868
* This text may contain formatting, colors, and links that should be preserved when rendering.
6969
*/
70-
mandateText?: string;
70+
mandateHTML?: string;
7171
}
7272

7373
/**
@@ -202,7 +202,7 @@ export interface EmbeddedPaymentElementConfiguration {
202202
rowSelectionBehavior?: EmbeddedRowSelectionBehavior;
203203
/**
204204
* Controls whether the view displays mandate text at the bottom for payment methods that require it.
205-
* If set to `false`, your integration must display `PaymentOptionDisplayData.mandateText` to the customer near your "Buy" button to comply with regulations.
205+
* If set to `false`, your integration must display `PaymentOptionDisplayData.mandateHTML` to the customer near your "Buy" button to comply with regulations.
206206
* Note: This doesn't affect mandates displayed in the form sheet.
207207
* Defaults to `true`.
208208
*/

0 commit comments

Comments
 (0)