@jimrising/easymerchantsdk-react-native 2.3.0 → 2.3.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.
- package/README.md +91 -90
- package/ios/easymerchantsdk.podspec +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Add the EasyMerchant SDK to your `package.json` under `dependencies`:
|
|
|
19
19
|
|
|
20
20
|
```json
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@jimrising/easymerchantsdk-react-native": "^2.3.
|
|
22
|
+
"@jimrising/easymerchantsdk-react-native": "^2.3.1"
|
|
23
23
|
}
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -157,24 +157,34 @@ The `makePayment` flow requires `apiKey` and `secretKey`. Below is a sample conf
|
|
|
157
157
|
|
|
158
158
|
```javascript
|
|
159
159
|
const configMakePayment = {
|
|
160
|
-
environment: 'sandbox', // String: 'sandbox' or 'production'
|
|
161
160
|
amount: '5.0', // String or number, must be positive
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
161
|
+
appearanceSettings: {
|
|
162
|
+
bodyBackgroundColor: '#121212', // String: hex color
|
|
163
|
+
borderRadius: '8', // String: border radius in pixels
|
|
164
|
+
containerBackgroundColor: '#1E1E1E', // String: hex color
|
|
165
|
+
fontFamily: '"Inter", sans-serif', // String: font family
|
|
166
|
+
fontSize: '16', // String: font size in pixels
|
|
167
|
+
fontWeight: 500, // Number: font weight
|
|
168
|
+
primaryButtonBackgroundColor: '#2563EB', // String: hex color
|
|
169
|
+
primaryButtonFontColor: '#FFFFFF', // String: hex color
|
|
170
|
+
primaryButtonHoverColor: '#1D4ED8', // String: hex color
|
|
171
|
+
primaryFontColor: '#FFFFFF', // String: hex color
|
|
172
|
+
secondaryButtonBackgroundColor: '#374151', // String: hex color
|
|
173
|
+
secondaryButtonFontColor: '#E5E7EB', // String: hex color
|
|
174
|
+
secondaryButtonHoverColor: '#4B5563', // String: hex color
|
|
175
|
+
secondaryFontColor: '#B0B0B0', // String: hex color
|
|
176
|
+
theme: 'light', // String: 'light' or 'dark'
|
|
177
|
+
},
|
|
174
178
|
apiKey: 'replace-with-api-key', // String: environment-specific API key
|
|
175
|
-
|
|
179
|
+
authenticatedACH: true, // Boolean: enable authenticated ACH
|
|
180
|
+
currency: 'usd', // String: currency code, e.g., 'usd'
|
|
181
|
+
email: 'john.doe@example.com', // String: customer email
|
|
182
|
+
environment: 'sandbox', // String: 'sandbox' or 'production'
|
|
176
183
|
fields: {
|
|
177
|
-
|
|
184
|
+
additional: [
|
|
185
|
+
{ name: 'phone_number', required: false, value: '+1-555-123-4567' },
|
|
186
|
+
{ name: 'description', required: true, value: 'Test payment for development purposes' }
|
|
187
|
+
],
|
|
178
188
|
billing: [
|
|
179
189
|
{ name: 'address', required: true, value: '123 Main Street, Suite 100' },
|
|
180
190
|
{ name: 'country', required: true, value: 'United States' },
|
|
@@ -182,48 +192,39 @@ const configMakePayment = {
|
|
|
182
192
|
{ name: 'city', required: false, value: 'San Francisco' },
|
|
183
193
|
{ name: 'postal_code', required: true, value: '94105' }
|
|
184
194
|
],
|
|
185
|
-
additional:
|
|
186
|
-
{ name: 'phone_number', required: false, value: '+1-555-123-4567' },
|
|
187
|
-
{ name: 'description', required: true, value: 'Test payment for development purposes' }
|
|
188
|
-
]
|
|
195
|
+
visibility: { additional: false, billing: false }, // Object: field visibility
|
|
189
196
|
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
primaryButtonBackgroundColor: '#2563EB', // String: hex color
|
|
197
|
-
primaryButtonHoverColor: '#1D4ED8', // String: hex color
|
|
198
|
-
primaryButtonFontColor: '#FFFFFF', // String: hex color
|
|
199
|
-
secondaryButtonBackgroundColor: '#374151', // String: hex color
|
|
200
|
-
secondaryButtonHoverColor: '#4B5563', // String: hex color
|
|
201
|
-
secondaryButtonFontColor: '#E5E7EB', // String: hex color
|
|
202
|
-
borderRadius: '8', // String: border radius in pixels
|
|
203
|
-
fontSize: '16', // String: font size in pixels
|
|
204
|
-
fontWeight: 500, // Number: font weight
|
|
205
|
-
fontFamily: '"Inter", sans-serif' // String: font family
|
|
197
|
+
grailPayParams: {
|
|
198
|
+
brandingName: 'Lyfecycle Payments', // String: branding name
|
|
199
|
+
finderSubtitle: 'Search for your bank', // String: bank finder subtitle
|
|
200
|
+
role: 'business', // String: GrailPay role
|
|
201
|
+
searchPlaceholder: 'Enter bank name', // String: search placeholder
|
|
202
|
+
timeout: 10, // Number: timeout in seconds
|
|
206
203
|
},
|
|
207
|
-
email: 'john.doe@example.com', // String: customer email
|
|
208
|
-
name: 'John Doe', // String: customer name
|
|
209
204
|
isEmail: true, // Boolean: allow email editing
|
|
205
|
+
is_recurring: false, // Boolean: enable recurring payments
|
|
210
206
|
metadata: {
|
|
211
207
|
metadataOne: 'metadataOne', // String: custom metadata
|
|
212
208
|
metadataTwo: 'metadataTwo' // String: custom metadata
|
|
213
209
|
},
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
brandingName: 'Lyfecycle Payments', // String: branding name
|
|
218
|
-
finderSubtitle: 'Search for your bank', // String: bank finder subtitle
|
|
219
|
-
searchPlaceholder: 'Enter bank name' // String: search placeholder
|
|
220
|
-
},
|
|
221
|
-
is_recurring: false, // Boolean: enable recurring payments
|
|
222
|
-
numOfCycle: 2, // if is_recurring == true
|
|
210
|
+
name: 'John Doe', // String: customer name
|
|
211
|
+
numOfCycle: 2, // if is_recurring == true
|
|
212
|
+
paymentMethods: ['card', 'ach'], // Array: at least one method ('card', 'ach')
|
|
223
213
|
recurringIntervals: ['daily', 'weekly', 'monthly'], // if is_recurring == true
|
|
214
|
+
recurringStartDate: 'dd/MM/yyyy', // must be today // required if is_recurring == true
|
|
224
215
|
recurringStartDateType: 'fixed', // if is_recurring == true
|
|
225
|
-
|
|
216
|
+
saveAccount: true, // Boolean: save account details for ACH
|
|
217
|
+
saveCard: true, // Boolean: save card details
|
|
218
|
+
secretKey: 'replace-with-secret-key', // String: environment-specific secret key
|
|
219
|
+
secureAuthentication: true, // Boolean: enable 3D Secure
|
|
220
|
+
showDonate: false, // Boolean: show donation option
|
|
221
|
+
showReceipt: true, // Boolean: show receipt after payment
|
|
222
|
+
showSubmitButton: true, // Boolean: show submit button
|
|
223
|
+
showTotal: true, // Boolean: display total amount
|
|
224
|
+
submitButtonText: 'Submit', // String: payment button text
|
|
225
|
+
tokenOnly: false, // Boolean: true for tokenization, false for full payment
|
|
226
226
|
};
|
|
227
|
+
|
|
227
228
|
```
|
|
228
229
|
|
|
229
230
|
#### Configuration for `makePaymentV2`
|
|
@@ -232,21 +233,33 @@ The `makePaymentV2` flow requires a `clientToken` and omits `apiKey` and `secret
|
|
|
232
233
|
|
|
233
234
|
```javascript
|
|
234
235
|
const configMakePaymentV2 = {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
appearanceSettings: {
|
|
237
|
+
bodyBackgroundColor: '#121212', // String: hex color
|
|
238
|
+
borderRadius: '8', // String: border radius in pixels
|
|
239
|
+
containerBackgroundColor: '#1E1E1E', // String: hex color
|
|
240
|
+
fontFamily: '"Inter", sans-serif', // String: font family
|
|
241
|
+
fontSize: '16', // String: font size in pixels
|
|
242
|
+
fontWeight: 500, // Number: font weight
|
|
243
|
+
primaryButtonBackgroundColor: '#2563EB', // String: hex color
|
|
244
|
+
primaryButtonFontColor: '#FFFFFF', // String: hex color
|
|
245
|
+
primaryButtonHoverColor: '#1D4ED8', // String: hex color
|
|
246
|
+
primaryFontColor: '#FFFFFF', // String: hex color
|
|
247
|
+
secondaryButtonBackgroundColor: '#374151', // String: hex color
|
|
248
|
+
secondaryButtonFontColor: '#E5E7EB', // String: hex color
|
|
249
|
+
secondaryButtonHoverColor: '#4B5563', // String: hex color
|
|
250
|
+
secondaryFontColor: '#B0B0B0', // String: hex color
|
|
251
|
+
theme: 'light', // String: 'light' or 'dark'
|
|
252
|
+
},
|
|
240
253
|
authenticatedACH: true, // Boolean: enable authenticated ACH
|
|
241
|
-
secureAuthentication: true, // Boolean: enable 3D Secure
|
|
242
|
-
showReceipt: true, // Boolean: show receipt after payment
|
|
243
|
-
showDonate: false, // Boolean: show donation option
|
|
244
|
-
showTotal: true, // Boolean: display total amount
|
|
245
|
-
showSubmitButton: true, // Boolean: show submit button
|
|
246
|
-
paymentMethods: ['card', 'ach'], // Array: at least one method ('card', 'ach')
|
|
247
254
|
clientToken: 'replace-with-client-token', // String: client token from payment intent API
|
|
255
|
+
currency: 'usd', // String: currency code, e.g., 'usd'
|
|
256
|
+
email: 'john.doe@example.com', // String: customer email
|
|
257
|
+
environment: 'sandbox', // String: 'sandbox' or 'production'
|
|
248
258
|
fields: {
|
|
249
|
-
|
|
259
|
+
additional: [
|
|
260
|
+
{ name: 'phone_number', required: false, value: '+1-555-123-4567' },
|
|
261
|
+
{ name: 'description', required: true, value: 'Test payment for development purposes' }
|
|
262
|
+
],
|
|
250
263
|
billing: [
|
|
251
264
|
{ name: 'address', required: true, value: '123 Main Street, Suite 100' },
|
|
252
265
|
{ name: 'country', required: true, value: 'United States' },
|
|
@@ -254,42 +267,30 @@ const configMakePaymentV2 = {
|
|
|
254
267
|
{ name: 'city', required: false, value: 'San Francisco' },
|
|
255
268
|
{ name: 'postal_code', required: true, value: '94105' }
|
|
256
269
|
],
|
|
257
|
-
additional:
|
|
258
|
-
{ name: 'phone_number', required: false, value: '+1-555-123-4567' },
|
|
259
|
-
{ name: 'description', required: true, value: 'Test payment for development purposes' }
|
|
260
|
-
]
|
|
270
|
+
visibility: { additional: false, billing: false }, // Object: field visibility
|
|
261
271
|
},
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
primaryButtonBackgroundColor: '#2563EB', // String: hex color
|
|
269
|
-
primaryButtonHoverColor: '#1D4ED8', // String: hex color
|
|
270
|
-
primaryButtonFontColor: '#FFFFFF', // String: hex color
|
|
271
|
-
secondaryButtonBackgroundColor: '#374151', // String: hex color
|
|
272
|
-
secondaryButtonHoverColor: '#4B5563', // String: hex color
|
|
273
|
-
secondaryButtonFontColor: '#E5E7EB', // String: hex color
|
|
274
|
-
borderRadius: '8', // String: border radius in pixels
|
|
275
|
-
fontSize: '16', // String: font size in pixels
|
|
276
|
-
fontWeight: 500, // Number: font weight
|
|
277
|
-
fontFamily: '"Inter", sans-serif' // String: font family
|
|
272
|
+
grailPayParams: {
|
|
273
|
+
brandingName: 'Lyfecycle Payments', // String: branding name
|
|
274
|
+
finderSubtitle: 'Search for your bank', // String: bank finder subtitle
|
|
275
|
+
role: 'business', // String: GrailPay role
|
|
276
|
+
searchPlaceholder: 'Enter bank name', // String: search placeholder
|
|
277
|
+
timeout: 10, // Number: timeout in seconds
|
|
278
278
|
},
|
|
279
|
-
email: 'john.doe@example.com', // String: customer email
|
|
280
|
-
name: 'John Doe', // String: customer name
|
|
281
279
|
isEmail: true, // Boolean: allow email editing
|
|
282
280
|
metadata: {
|
|
283
281
|
metadataOne: 'metadataOne', // String: custom metadata
|
|
284
|
-
metadataTwo: 'metadataTwo' // String: custom metadata
|
|
285
|
-
},
|
|
286
|
-
grailPayParams: {
|
|
287
|
-
role: 'business', // String: GrailPay role
|
|
288
|
-
timeout: 10, // Number: timeout in seconds
|
|
289
|
-
brandingName: 'Lyfecycle Payments', // String: branding name
|
|
290
|
-
finderSubtitle: 'Search for your bank', // String: bank finder subtitle
|
|
291
|
-
searchPlaceholder: 'Enter bank name' // String: search placeholder
|
|
282
|
+
metadataTwo: 'metadataTwo', // String: custom metadata
|
|
292
283
|
},
|
|
284
|
+
name: 'John Doe', // String: customer name
|
|
285
|
+
paymentMethods: ['card', 'ach'], // Array: at least one method ('card', 'ach')
|
|
286
|
+
saveAccount: true, // Boolean: save account details for ACH
|
|
287
|
+
saveCard: true, // Boolean: save card details
|
|
288
|
+
secureAuthentication: true, // Boolean: enable 3D Secure
|
|
289
|
+
showDonate: false, // Boolean: show donation option
|
|
290
|
+
showReceipt: true, // Boolean: show receipt after payment
|
|
291
|
+
showSubmitButton: true, // Boolean: show submit button
|
|
292
|
+
showTotal: true, // Boolean: display total amount
|
|
293
|
+
submitButtonText: 'Submit', // String: payment button text
|
|
293
294
|
};
|
|
294
295
|
```
|
|
295
296
|
|