@tonder.io/ionic-lite-sdk 0.0.52-beta.DEV-1610.3 → 0.0.52

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 CHANGED
@@ -141,6 +141,59 @@ When calling the `payment` method, use the following data structure:
141
141
  - This is only used when not paying with a payment_method.
142
142
 
143
143
  - **payment_method**: (for LiteCheckout) String indicating the alternative payment method to be used (e.g., "Spei"). This is only used when not paying with a card.
144
+ - **apm_config**: (Optional) Configuration object for APM-specific options. Only applicable when using alternative payment methods like Mercado Pago.
145
+ <details>
146
+ <summary>APM Config Fields - Mercado Pago</summary>
147
+
148
+ | **Field** | **Type** | **Description** |
149
+ |-------------------------------------|--------------------------------------------|---------------------------------------------------------------------------|
150
+ | `binary_mode` | `boolean` | If `true`, payment must be approved or rejected immediately (no pending). |
151
+ | `additional_info` | `string` | Extra info shown during checkout and in payment details. |
152
+ | `back_urls` | `object` | URLs to redirect the user after payment. |
153
+ | └─ `success` | `string` | Redirect URL after successful payment. |
154
+ | └─ `pending` | `string` | Redirect URL after pending payment. |
155
+ | └─ `failure` | `string` | Redirect URL after failed/canceled payment. |
156
+ | `auto_return` | `"approved"` \| `"all"` | Enables auto redirection after payment completion. |
157
+ | `payment_methods` | `object` | Payment method restrictions and preferences. |
158
+ | └─ `excluded_payment_methods[]` | `array` | List of payment methods to exclude. |
159
+ | └─ `excluded_payment_methods[].id` | `string` | ID of payment method to exclude (e.g., "visa"). |
160
+ | └─ `excluded_payment_types[]` | `array` | List of payment types to exclude. |
161
+ | └─ `excluded_payment_types[].id` | `string` | ID of payment type to exclude (e.g., "ticket"). |
162
+ | └─ `default_payment_method_id` | `string` | Default payment method (e.g., "master"). |
163
+ | └─ `installments` | `number` | Max number of installments allowed. |
164
+ | └─ `default_installments` | `number` | Default number of installments suggested. |
165
+ | `expires` | `boolean` | Whether the preference has expiration. |
166
+ | `expiration_date_from` | `string` (ISO 8601) | Start of validity period (e.g. `"2025-01-01T12:00:00-05:00"`). |
167
+ | `expiration_date_to` | `string` (ISO 8601) | End of validity period. |
168
+ | `differential_pricing` | `object` | Configuration for differential pricing. |
169
+ | └─ `id` | `number` | ID of the differential pricing strategy. |
170
+ | `marketplace` | `string` | Marketplace identifier (default: "NONE"). |
171
+ | `marketplace_fee` | `number` | Fee to collect as marketplace commission. |
172
+ | `tracks[]` | `array` | Ad tracking configurations. |
173
+ | └─ `type` | `"google_ad"` \| `"facebook_ad"` | Type of tracker. |
174
+ | └─ `values.conversion_id` | `string` | Google Ads conversion ID. |
175
+ | └─ `values.conversion_label` | `string` | Google Ads label. |
176
+ | └─ `values.pixel_id` | `string` | Facebook Pixel ID. |
177
+ | `statement_descriptor` | `string` | Text on payer’s card statement (max 16 characters). |
178
+ | `shipments` | `object` | Shipping configuration. |
179
+ | └─ `mode` | `"custom"` \| `"me2"` \| `"not_specified"` | Type of shipping mode. |
180
+ | └─ `local_pickup` | `boolean` | Enable pickup at local branch (for `me2`). |
181
+ | └─ `dimensions` | `string` | Package dimensions (e.g. `10x10x10,500`). |
182
+ | └─ `default_shipping_method` | `number` | Default shipping method (for `me2`). |
183
+ | └─ `free_methods[]` | `array` | Shipping methods offered for free (for `me2`). |
184
+ | └─ `free_methods[].id` | `number` | ID of free shipping method. |
185
+ | └─ `cost` | `number` | Shipping cost (only for `custom` mode). |
186
+ | └─ `free_shipping` | `boolean` | If `true`, shipping is free (`custom` only). |
187
+ | └─ `receiver_address` | `object` | Shipping address. |
188
+ | └─ `receiver_address.zip_code` | `string` | ZIP or postal code. |
189
+ | └─ `receiver_address.street_name` | `string` | Street name. |
190
+ | └─ `receiver_address.street_number` | `number` | Street number. |
191
+ | └─ `receiver_address.city_name` | `string` | City name. |
192
+ | └─ `receiver_address.state_name` | `string` | State name. |
193
+ | └─ `receiver_address.country_name` | `string` | Country name. |
194
+ | └─ `receiver_address.floor` | `string` | Floor (optional). |
195
+ | └─ `receiver_address.apartment` | `string` | Apartment or unit (optional). |
196
+ </details>
144
197
 
145
198
  ```javascript
146
199
  const paymentData = {
@@ -154,6 +207,10 @@ const paymentData = {
154
207
  postCode: "12345",
155
208
  email: "john.doe@example.com",
156
209
  phone: "1234567890",
210
+ identification:{
211
+ type: "CPF",
212
+ number: "19119119100"
213
+ }
157
214
  },
158
215
  cart: {
159
216
  total: "100.00",
@@ -184,6 +241,7 @@ const paymentData = {
184
241
  },
185
242
  // card: "skyflow_id" // for a selected saved card.
186
243
  // payment_method: "Spei", // For the selected payment method.
244
+ // apm_config: {} // Optional, only for APMs like Mercado Pago, Oxxo Pay
187
245
  };
188
246
  ```
189
247
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonder.io/ionic-lite-sdk",
3
- "version": "0.0.52-beta.DEV-1610.3",
3
+ "version": "0.0.52",
4
4
  "description": "Tonder ionic lite SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -156,7 +156,6 @@ export class ThreeDSHandler {
156
156
  const self = this;
157
157
 
158
158
  const listenerHandler = async (event: any) => {
159
-
160
159
  const checkStatus = (result: any) => result?.transaction_status !== "Pending";
161
160
 
162
161
  const executeAction = () => {