From eed51312abd12d62c69eb586cd543e1ddc6f4db4 Mon Sep 17 00:00:00 2001 From: David Grayston Date: Mon, 2 Feb 2026 17:31:29 +0000 Subject: [PATCH] feat: Added grand_total_tax to transaction totals and adjusted totals --- CHANGELOG.md | 1 + .../Shared/TransactionPayoutTotals.py | 2 + .../Entities/Shared/TransactionTotals.py | 2 + .../Shared/TransactionTotalsAdjusted.py | 2 + .../Shared/TransactionPayoutTotals.py | 2 + .../Entities/Shared/TransactionTotals.py | 2 + .../Shared/TransactionTotalsAdjusted.py | 2 + .../_fixtures/response/list_default.json | 54 +- .../_fixtures/response/list_default.json | 1902 +++++++++-------- .../_fixtures/payload/transaction.billed.json | 534 ++--- .../payload/transaction.canceled.json | 534 ++--- .../payload/transaction.completed.json | 637 +++--- .../payload/transaction.created.json | 520 ++--- .../_fixtures/payload/transaction.paid.json | 606 +++--- .../payload/transaction.past_due.json | 496 ++--- .../payload/transaction.payment_failed.json | 564 ++--- .../_fixtures/payload/transaction.ready.json | 520 ++--- .../payload/transaction.revised.json | 518 ++--- .../payload/transaction.updated.json | 534 ++--- .../_fixtures/response/full_entity.json | 6 +- .../response/full_entity_with_includes.json | 5 +- ...ment_method_change_transaction_entity.json | 16 +- .../response/preview_charge_full_entity.json | 9 +- .../response/preview_update_full_entity.json | 9 +- .../_fixtures/response/full_entity.json | 12 +- .../response/full_entity_with_includes.json | 10 +- .../_fixtures/response/list_default.json | 39 +- .../response/list_paginated_page_one.json | 69 +- .../response/list_paginated_page_two.json | 67 +- .../_fixtures/response/minimal_entity.json | 6 +- .../_fixtures/response/preview_entity.json | 15 +- .../entity/transaction.billed.json | 532 ++--- .../entity/transaction.canceled.json | 532 ++--- .../entity/transaction.completed.json | 635 +++--- .../entity/transaction.created.json | 520 ++--- .../notification/entity/transaction.paid.json | 680 +++--- .../entity/transaction.past_due.json | 498 ++--- .../entity/transaction.payment_failed.json | 562 ++--- .../entity/transaction.ready.json | 520 ++--- .../entity/transaction.revised.json | 659 +++--- .../entity/transaction.updated.json | 532 ++--- 41 files changed, 6769 insertions(+), 6596 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a97b0517..cca76775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx ### Added - Added support for `wechat_pay` payment method type. See [related changelog](https://developer.paddle.com/changelog/2025/wechat-pay-payment-method?utm_source=dx&utm_medium=paddle-python-sdk) +- Added `grand_total_tax` to transaction totals and adjusted totals. See [related changelog](https://developer.paddle.com/changelog/2026/grand-total-tax-field?utm_source=dx&utm_medium=paddle-python-sdk) ## 1.12.0 - 2025-11-12 diff --git a/paddle_billing/Entities/Shared/TransactionPayoutTotals.py b/paddle_billing/Entities/Shared/TransactionPayoutTotals.py index 7037a7e9..2d40cd99 100644 --- a/paddle_billing/Entities/Shared/TransactionPayoutTotals.py +++ b/paddle_billing/Entities/Shared/TransactionPayoutTotals.py @@ -20,6 +20,7 @@ class TransactionPayoutTotals: credit_to_balance: str exchange_rate: str fee_rate: str + grand_total_tax: str @staticmethod def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals: @@ -37,4 +38,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals: credit_to_balance=data["credit_to_balance"], exchange_rate=data["exchange_rate"], fee_rate=data["fee_rate"], + grand_total_tax=data["grand_total_tax"], ) diff --git a/paddle_billing/Entities/Shared/TransactionTotals.py b/paddle_billing/Entities/Shared/TransactionTotals.py index 8cff1b31..7db40025 100644 --- a/paddle_billing/Entities/Shared/TransactionTotals.py +++ b/paddle_billing/Entities/Shared/TransactionTotals.py @@ -18,6 +18,7 @@ class TransactionTotals: earnings: str | None currency_code: CurrencyCode credit_to_balance: str + grand_total_tax: str @staticmethod def from_dict(data: dict[str, Any]) -> TransactionTotals: @@ -33,4 +34,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotals: earnings=data.get("earnings"), currency_code=CurrencyCode(data["currency_code"]), credit_to_balance=data["credit_to_balance"], + grand_total_tax=data["grand_total_tax"], ) diff --git a/paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py b/paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py index 01c24523..93fdab36 100644 --- a/paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py +++ b/paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py @@ -15,6 +15,7 @@ class TransactionTotalsAdjusted: earnings: str | None currency_code: CurrencyCode retained_fee: str + grand_total_tax: str @staticmethod def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted: @@ -27,4 +28,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted: earnings=data.get("earnings"), currency_code=CurrencyCode(data["currency_code"]), retained_fee=data["retained_fee"], + grand_total_tax=data["grand_total_tax"], ) diff --git a/paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotals.py b/paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotals.py index a621ca28..67a6b7e3 100644 --- a/paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotals.py +++ b/paddle_billing/Notifications/Entities/Shared/TransactionPayoutTotals.py @@ -20,6 +20,7 @@ class TransactionPayoutTotals: credit_to_balance: str exchange_rate: str | None fee_rate: str | None + grand_total_tax: str | None @staticmethod def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals: @@ -37,4 +38,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals: credit_to_balance=data["credit_to_balance"], exchange_rate=data.get("exchange_rate"), fee_rate=data.get("fee_rate"), + grand_total_tax=data.get("grand_total_tax"), ) diff --git a/paddle_billing/Notifications/Entities/Shared/TransactionTotals.py b/paddle_billing/Notifications/Entities/Shared/TransactionTotals.py index 4e1bcdf3..2009bbf6 100644 --- a/paddle_billing/Notifications/Entities/Shared/TransactionTotals.py +++ b/paddle_billing/Notifications/Entities/Shared/TransactionTotals.py @@ -18,6 +18,7 @@ class TransactionTotals: earnings: str | None currency_code: CurrencyCode credit_to_balance: str + grand_total_tax: str | None @staticmethod def from_dict(data: dict[str, Any]) -> TransactionTotals: @@ -33,4 +34,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotals: earnings=data.get("earnings"), currency_code=CurrencyCode(data["currency_code"]), credit_to_balance=data["credit_to_balance"], + grand_total_tax=data.get("grand_total_tax"), ) diff --git a/paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py b/paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py index e8fbc8d9..775c56ed 100644 --- a/paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py +++ b/paddle_billing/Notifications/Entities/Shared/TransactionTotalsAdjusted.py @@ -15,6 +15,7 @@ class TransactionTotalsAdjusted: earnings: str | None currency_code: CurrencyCode retained_fee: str | None + grand_total_tax: str | None @staticmethod def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted: @@ -27,4 +28,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted: earnings=data.get("earnings"), currency_code=CurrencyCode(data["currency_code"]), retained_fee=data.get("retained_fee"), + grand_total_tax=data.get("grand_total_tax"), ) diff --git a/tests/Functional/Resources/Events/_fixtures/response/list_default.json b/tests/Functional/Resources/Events/_fixtures/response/list_default.json index 2278fc6b..118ab1db 100644 --- a/tests/Functional/Resources/Events/_fixtures/response/list_default.json +++ b/tests/Functional/Resources/Events/_fixtures/response/list_default.json @@ -413,7 +413,8 @@ "subtotal": "55000", "grand_total": "66000", "currency_code": "GBP", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "11000" }, "line_items": [ { @@ -517,7 +518,8 @@ "earnings": "0", "subtotal": "55000", "grand_total": "66000", - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "11000" } }, "payments": [ @@ -745,7 +747,8 @@ "subtotal": "55000", "grand_total": "66000", "currency_code": "GBP", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "11000" }, "line_items": [ { @@ -849,7 +852,8 @@ "earnings": "0", "subtotal": "55000", "grand_total": "66000", - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "11000" } }, "payments": [ @@ -1077,7 +1081,8 @@ "subtotal": "55000", "grand_total": "66000", "currency_code": "GBP", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "11000" }, "line_items": [ { @@ -1181,7 +1186,8 @@ "earnings": "0", "subtotal": "55000", "grand_total": "66000", - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "11000" } }, "payments": [ @@ -1409,7 +1415,8 @@ "subtotal": "55000", "grand_total": "66000", "currency_code": "GBP", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "11000" }, "line_items": [ { @@ -1513,7 +1520,8 @@ "earnings": "0", "subtotal": "55000", "grand_total": "66000", - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "11000" } }, "payments": [], @@ -1720,7 +1728,8 @@ "subtotal": "55000", "grand_total": "66000", "currency_code": "GBP", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "11000" }, "line_items": [ { @@ -1824,7 +1833,8 @@ "earnings": "0", "subtotal": "55000", "grand_total": "66000", - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "11000" } }, "payments": [], @@ -2077,7 +2087,8 @@ "subtotal": "59900", "grand_total": "63494", "currency_code": "USD", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "3594" }, "line_items": [ { @@ -2197,7 +2208,8 @@ "earnings": "0", "subtotal": "59900", "grand_total": "63494", - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "3594" } }, "payments": [], @@ -2404,7 +2416,8 @@ "subtotal": "55000", "grand_total": "66000", "currency_code": "GBP", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "11000" }, "line_items": [ { @@ -2502,7 +2515,8 @@ "grand_total": "81066", "currency_code": "USD", "exchange_rate": "1.2282731999999998", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "13511" }, "tax_rates_used": [ { @@ -2522,7 +2536,8 @@ "earnings": "51660", "subtotal": "55000", "grand_total": "66000", - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "11000" } }, "payments": [ @@ -2770,7 +2785,8 @@ "subtotal": "55000", "grand_total": "66000", "currency_code": "GBP", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "11000" }, "line_items": [ { @@ -2868,7 +2884,8 @@ "grand_total": "81066", "currency_code": "USD", "exchange_rate": "1.2282731999999998", - "credit_to_balance": "0" + "credit_to_balance": "0", + "grand_total_tax": "13511" }, "tax_rates_used": [ { @@ -2888,7 +2905,8 @@ "earnings": "51660", "subtotal": "55000", "grand_total": "66000", - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "11000" } }, "payments": [ diff --git a/tests/Functional/Resources/Notifications/_fixtures/response/list_default.json b/tests/Functional/Resources/Notifications/_fixtures/response/list_default.json index 9e7b9858..ec34373c 100644 --- a/tests/Functional/Resources/Notifications/_fixtures/response/list_default.json +++ b/tests/Functional/Resources/Notifications/_fixtures/response/list_default.json @@ -1,971 +1,975 @@ { - "data": [ - { - "id": "ntf_01h8bzam1z32agrxjwhjgqk8w6", - "type": "business.updated", - "status": "failed", - "payload": { - "data": { - "id": "biz_01h84a7hr4pzhsajkm8tev89ev", - "name": "ChatApp Inc.", - "status": "active", - "contacts": [ - { - "name": "Parker Jones", - "email": "parker@example.com" - }, - { - "name": "Jo Riley", - "email": "jo@example.com" - }, - { - "name": "Jesse Garcia", - "email": "jo@example.com" - } - ], - "created_at": "2023-08-18T12:34:25.668Z", - "updated_at": "2023-08-21T11:57:47.03542Z", - "company_number": "555775291485", - "tax_identifier": null - }, - "event_id": "evt_01h8bzakzx3hm2fmen703n5q45", - "event_type": "business.updated", - "occurred_at": "2023-08-21T11:57:47.390028Z", - "notification_id": "ntf_01h8bzam1z32agrxjwhjgqk8w6" + "data": [ + { + "id": "ntf_01h8bzam1z32agrxjwhjgqk8w6", + "type": "business.updated", + "status": "failed", + "payload": { + "data": { + "id": "biz_01h84a7hr4pzhsajkm8tev89ev", + "name": "ChatApp Inc.", + "status": "active", + "contacts": [ + { + "name": "Parker Jones", + "email": "parker@example.com" + }, + { + "name": "Jo Riley", + "email": "jo@example.com" }, - "occurred_at": "2023-08-21T11:57:47.390028Z", - "delivered_at": null, - "replayed_at": null, - "origin": "event", - "last_attempt_at": "2023-08-21T12:15:53.620185Z", - "retry_at": null, - "times_attempted": 10, - "notification_setting_id": "ntfset_01h126ps19rp06wn89v9797mab" + { + "name": "Jesse Garcia", + "email": "jo@example.com" + } + ], + "created_at": "2023-08-18T12:34:25.668Z", + "updated_at": "2023-08-21T11:57:47.03542Z", + "company_number": "555775291485", + "tax_identifier": null }, - { - "id": "ntf_01h8brhd934tvsvf8s5q7thd2r", - "type": "transaction.created", - "status": "delivered", - "payload": { - "data": { - "id": "txn_01h8brhckjd6qk4n7e4py2340t", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 10 - }, - "tax_mode": "account_setting", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "description": "Monthly (per seat)", - "name": "Monthly (per seat)", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [ - { - "unit_price": { - "amount": "5000", - "currency_code": "AUD" - }, - "country_codes": [ - "AU" - ] - } - ] - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "proration": null - }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "description": "Monthly (recurring addon)", - "name": "Monthly (recurring addon)", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [ - { - "unit_price": { - "amount": "20000", - "currency_code": "AUD" - }, - "country_codes": [ - "AU" - ] - } - ] - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "proration": null - }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "description": "One-time charge", - "name": "One-time charge", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [ - { - "unit_price": { - "amount": "40000", - "currency_code": "AUD" - }, - "country_codes": [ - "AU" - ] - } - ] - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "draft", - "details": { - "totals": { - "fee": null, - "tax": "11980", - "total": "71880", - "credit": "0", - "credit_to_balance": "0", - "balance": "71880", - "discount": "0", - "earnings": null, - "subtotal": "59900", - "grand_total": "71880", - "currency_code": "USD" - }, - "line_items": [ - { - "id": "txnitm_01h8brhcmxzjp7zy6zxa4rmb6w", - "totals": { - "tax": "6000", - "total": "36000", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "ChatApp Pro", - "status": "active", - "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/2nmP8MQSret0aWeDemRw_icon1.png", - "description": "Everything in basic, plus access to a suite of powerful tools and features designed to take your team's productivity to the next level.", - "tax_category": "standard" - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.2", - "unit_totals": { - "tax": "600", - "total": "3600", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01h8brhcmxzjp7zy6zxbxpks7d", - "totals": { - "tax": "2000", - "total": "12000", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Voice rooms addon", - "status": "active", - "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/GcZzBjXRfiraensppgtQ_icon2.png", - "description": "Create voice rooms in your chats to work in real time alongside your colleagues. Includes unlimited voice rooms and recording backup for compliance.", - "tax_category": "standard" - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.2", - "unit_totals": { - "tax": "2000", - "total": "12000", - "discount": "0", - "subtotal": "10000" - } - }, - { - "id": "txnitm_01h8brhcmxzjp7zy6zxdm1d0wt", - "totals": { - "tax": "3980", - "total": "23880", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "status": "active", - "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/SW3OevDQ92dUHSkN5a2x_icon3.png", - "description": "Make ChatApp truly your own with custom domains! Custom domains reinforce your brand identity and make it easy for your team to access ChatApp.", - "tax_category": "standard" - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.2", - "unit_totals": { - "tax": "3980", - "total": "23880", - "discount": "0", - "subtotal": "19900" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "11980", - "total": "71880", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.2" - } - ] - }, - "checkout": { - "url": "https://magnificent-entremet-7ae0c6.netlify.app/default/overlay?_ptxn=txn_01h8brhckjd6qk4n7e4py2340t" + "event_id": "evt_01h8bzakzx3hm2fmen703n5q45", + "event_type": "business.updated", + "occurred_at": "2023-08-21T11:57:47.390028Z", + "notification_id": "ntf_01h8bzam1z32agrxjwhjgqk8w6" + }, + "occurred_at": "2023-08-21T11:57:47.390028Z", + "delivered_at": null, + "replayed_at": null, + "origin": "event", + "last_attempt_at": "2023-08-21T12:15:53.620185Z", + "retry_at": null, + "times_attempted": 10, + "notification_setting_id": "ntfset_01h126ps19rp06wn89v9797mab" + }, + { + "id": "ntf_01h8brhd934tvsvf8s5q7thd2r", + "type": "transaction.created", + "status": "delivered", + "payload": { + "data": { + "id": "txn_01h8brhckjd6qk4n7e4py2340t", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 10 + }, + "tax_mode": "account_setting", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" + }, + "description": "Monthly (per seat)", + "name": "Monthly (per seat)", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [ + { + "unit_price": { + "amount": "5000", + "currency_code": "AUD" }, - "payments": [], - "billed_at": null, - "address_id": null, - "created_at": "2023-08-21T09:59:09.237822398Z", - "invoice_id": null, - "updated_at": "2023-08-21T09:59:09.237822398Z", - "business_id": null, - "custom_data": null, - "customer_id": null, - "discount_id": null, - "currency_code": "USD", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null - }, - "event_id": "evt_01h8brhd6mj4frv1dg3cghcrs3", - "event_type": "transaction.created", - "occurred_at": "2023-08-21T09:59:09.781003Z", - "notification_id": "ntf_01h8brhd934tvsvf8s5q7thd2r" + "country_codes": [ + "AU" + ] + } + ] + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "proration": null }, - "occurred_at": "2023-08-21T09:59:09.781003Z", - "delivered_at": "2023-08-21T09:59:10.316373Z", - "replayed_at": null, - "origin": "event", - "last_attempt_at": "2023-08-21T09:59:09.902732Z", - "retry_at": null, - "times_attempted": 1, - "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" - }, - { - "id": "ntf_01h8bkrfe7w1vwf8xmytwn51e7", - "type": "product.updated", - "status": "failed", - "payload": { - "data": { - "id": "pro_01h7zcgmdc6tmwtjehp3sh7azf", - "name": "ChatApp for Schools", - "status": "archived", - "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/2nmP8MQSret0aWeDemRw_icon1.png", - "created_at": "2023-08-16T14:38:08.3Z", - "custom_data": { - "features": { - "crm": false, - "reports": true, - "data_retention": true - } + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "description": "Monthly (recurring addon)", + "name": "Monthly (recurring addon)", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [ + { + "unit_price": { + "amount": "20000", + "currency_code": "AUD" }, - "description": "Spend more time engaging with students with ChataApp Education. Includes features from our Pro plan, plus tools to help educators track student progress.", - "tax_category": "standard" + "country_codes": [ + "AU" + ] + } + ] + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 }, - "event_id": "evt_01h8bkrfbwtaram1w8m7qekytx", - "event_type": "product.updated", - "occurred_at": "2023-08-21T08:35:38.493036Z", - "notification_id": "ntf_01h8bkrfe7w1vwf8xmytwn51e7" + "tax_mode": "account_setting", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "description": "One-time charge", + "name": "One-time charge", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [ + { + "unit_price": { + "amount": "40000", + "currency_code": "AUD" + }, + "country_codes": [ + "AU" + ] + } + ] + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "draft", + "details": { + "totals": { + "fee": null, + "tax": "11980", + "total": "71880", + "credit": "0", + "credit_to_balance": "0", + "balance": "71880", + "discount": "0", + "earnings": null, + "subtotal": "59900", + "grand_total": "71880", + "currency_code": "USD", + "grand_total_tax": "11980" }, - "occurred_at": "2023-08-21T08:35:38.493036Z", - "delivered_at": null, - "replayed_at": null, - "origin": "event", - "last_attempt_at": "2023-08-21T08:53:50.759289Z", - "retry_at": null, - "times_attempted": 10, - "notification_setting_id": "ntfset_01gt21c5pdx9q1e4mh1xrsjjn6" + "line_items": [ + { + "id": "txnitm_01h8brhcmxzjp7zy6zxa4rmb6w", + "totals": { + "tax": "6000", + "total": "36000", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "ChatApp Pro", + "status": "active", + "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/2nmP8MQSret0aWeDemRw_icon1.png", + "description": "Everything in basic, plus access to a suite of powerful tools and features designed to take your team's productivity to the next level.", + "tax_category": "standard" + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.2", + "unit_totals": { + "tax": "600", + "total": "3600", + "discount": "0", + "subtotal": "3000" + } + }, + { + "id": "txnitm_01h8brhcmxzjp7zy6zxbxpks7d", + "totals": { + "tax": "2000", + "total": "12000", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Voice rooms addon", + "status": "active", + "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/GcZzBjXRfiraensppgtQ_icon2.png", + "description": "Create voice rooms in your chats to work in real time alongside your colleagues. Includes unlimited voice rooms and recording backup for compliance.", + "tax_category": "standard" + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.2", + "unit_totals": { + "tax": "2000", + "total": "12000", + "discount": "0", + "subtotal": "10000" + } + }, + { + "id": "txnitm_01h8brhcmxzjp7zy6zxdm1d0wt", + "totals": { + "tax": "3980", + "total": "23880", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "status": "active", + "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/SW3OevDQ92dUHSkN5a2x_icon3.png", + "description": "Make ChatApp truly your own with custom domains! Custom domains reinforce your brand identity and make it easy for your team to access ChatApp.", + "tax_category": "standard" + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.2", + "unit_totals": { + "tax": "3980", + "total": "23880", + "discount": "0", + "subtotal": "19900" + } + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "11980", + "total": "71880", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.2" + } + ] + }, + "checkout": { + "url": "https://magnificent-entremet-7ae0c6.netlify.app/default/overlay?_ptxn=txn_01h8brhckjd6qk4n7e4py2340t" + }, + "payments": [], + "billed_at": null, + "address_id": null, + "created_at": "2023-08-21T09:59:09.237822398Z", + "invoice_id": null, + "updated_at": "2023-08-21T09:59:09.237822398Z", + "business_id": null, + "custom_data": null, + "customer_id": null, + "discount_id": null, + "currency_code": "USD", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null }, - { - "id": "ntf_01h84cka91b65gy90qhe2tw2q6", - "type": "subscription.trialing", - "status": "delivered", - "payload": { - "data": { - "id": "sub_01h84ck8sg4ebkpzqb9x2mtjjf", - "items": [ - { - "price": { - "id": "pri_01h84cdy3xatsp16afda2gekzy", - "tax_mode": "account_setting", - "product_id": "pro_01h84cd36f900f3wmpdfamgv8w", - "unit_price": { - "amount": "0", - "currency_code": "USD" - }, - "description": "Annual plan", - "trial_period": { - "interval": "day", - "frequency": 10 - }, - "billing_cycle": { - "interval": "year", - "frequency": 1 - } - }, - "status": "trialing", - "quantity": 1, - "recurring": true, - "created_at": "2023-08-18T13:15:46.864164Z", - "updated_at": "2023-08-18T13:15:46.864164Z", - "trial_dates": { - "ends_at": "2023-08-28T13:15:46.864158Z", - "starts_at": "2023-08-18T13:15:46.864158Z" - }, - "next_billed_at": "2023-08-28T13:15:46.864158Z", - "previously_billed_at": null - }, - { - "price": { - "id": "pri_01h84cdy3xatsp16afda2gekzy", - "tax_mode": "account_setting", - "product_id": "pro_01h84cd36f900f3wmpdfamgv8w", - "unit_price": { - "amount": "0", - "currency_code": "USD" - }, - "description": "Annual plan", - "trial_period": { - "interval": "day", - "frequency": 10 - }, - "billing_cycle": { - "interval": "year", - "frequency": 1 - } - }, - "status": "trialing", - "quantity": 1, - "recurring": true, - "created_at": "2023-08-18T13:15:46.864164Z", - "updated_at": "2023-08-18T13:15:46.864164Z", - "trial_dates": { - "ends_at": "2023-08-28T13:15:46.864158Z", - "starts_at": "2023-08-18T13:15:46.864158Z" - }, - "next_billed_at": "2023-08-28T13:15:46.864158Z", - "previously_billed_at": null, - "product": { - "id": "pro_01h84cd36f900f3wmpdfamgv8w", - "name": "ChatApp Pro", - "description": "Everything in basic, plus access to a suite of powerful tools and features designed to take your team's productivity to the next level.", - "tax_category": "standard", - "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/2nmP8MQSret0aWeDemRw_icon1.png", - "status": "active", - "created_at": "2023-08-16T14:38:08.3Z", - "updated_at": "2023-08-16T14:38:08.3Z" - } - } - ], - "status": "trialing", - "paused_at": null, - "address_id": "add_01h84cjfy5411jpjes4hmafqry", - "created_at": "2023-08-18T13:15:46.864163Z", - "started_at": "2023-08-18T13:15:46.864158Z", - "updated_at": "2023-08-18T13:15:46.864163Z", - "business_id": null, - "canceled_at": null, - "custom_data": null, - "customer_id": "ctm_01h84cjfwmdph1k8kgsyjt3k7g", - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "currency_code": "USD", - "next_billed_at": "2023-08-28T13:15:46.864158Z", - "billing_details": null, - "collection_mode": "automatic", - "first_billed_at": null, - "scheduled_change": null, - "current_billing_period": { - "ends_at": "2023-08-28T13:15:46.864158Z", - "starts_at": "2023-08-18T13:15:46.864158Z" - }, - "import_meta": null + "event_id": "evt_01h8brhd6mj4frv1dg3cghcrs3", + "event_type": "transaction.created", + "occurred_at": "2023-08-21T09:59:09.781003Z", + "notification_id": "ntf_01h8brhd934tvsvf8s5q7thd2r" + }, + "occurred_at": "2023-08-21T09:59:09.781003Z", + "delivered_at": "2023-08-21T09:59:10.316373Z", + "replayed_at": null, + "origin": "event", + "last_attempt_at": "2023-08-21T09:59:09.902732Z", + "retry_at": null, + "times_attempted": 1, + "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" + }, + { + "id": "ntf_01h8bkrfe7w1vwf8xmytwn51e7", + "type": "product.updated", + "status": "failed", + "payload": { + "data": { + "id": "pro_01h7zcgmdc6tmwtjehp3sh7azf", + "name": "ChatApp for Schools", + "status": "archived", + "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/2nmP8MQSret0aWeDemRw_icon1.png", + "created_at": "2023-08-16T14:38:08.3Z", + "custom_data": { + "features": { + "crm": false, + "reports": true, + "data_retention": true + } + }, + "description": "Spend more time engaging with students with ChataApp Education. Includes features from our Pro plan, plus tools to help educators track student progress.", + "tax_category": "standard" + }, + "event_id": "evt_01h8bkrfbwtaram1w8m7qekytx", + "event_type": "product.updated", + "occurred_at": "2023-08-21T08:35:38.493036Z", + "notification_id": "ntf_01h8bkrfe7w1vwf8xmytwn51e7" + }, + "occurred_at": "2023-08-21T08:35:38.493036Z", + "delivered_at": null, + "replayed_at": null, + "origin": "event", + "last_attempt_at": "2023-08-21T08:53:50.759289Z", + "retry_at": null, + "times_attempted": 10, + "notification_setting_id": "ntfset_01gt21c5pdx9q1e4mh1xrsjjn6" + }, + { + "id": "ntf_01h84cka91b65gy90qhe2tw2q6", + "type": "subscription.trialing", + "status": "delivered", + "payload": { + "data": { + "id": "sub_01h84ck8sg4ebkpzqb9x2mtjjf", + "items": [ + { + "price": { + "id": "pri_01h84cdy3xatsp16afda2gekzy", + "tax_mode": "account_setting", + "product_id": "pro_01h84cd36f900f3wmpdfamgv8w", + "unit_price": { + "amount": "0", + "currency_code": "USD" }, - "event_id": "evt_01h84cka4p40e737vm1ajb2bc5", - "event_type": "subscription.trialing", - "occurred_at": "2023-08-18T13:15:48.246292Z", - "notification_id": "ntf_01h84cka91b65gy90qhe2tw2q6" + "description": "Annual plan", + "trial_period": { + "interval": "day", + "frequency": 10 + }, + "billing_cycle": { + "interval": "year", + "frequency": 1 + } + }, + "status": "trialing", + "quantity": 1, + "recurring": true, + "created_at": "2023-08-18T13:15:46.864164Z", + "updated_at": "2023-08-18T13:15:46.864164Z", + "trial_dates": { + "ends_at": "2023-08-28T13:15:46.864158Z", + "starts_at": "2023-08-18T13:15:46.864158Z" + }, + "next_billed_at": "2023-08-28T13:15:46.864158Z", + "previously_billed_at": null }, - "occurred_at": "2023-08-18T13:15:48.246292Z", - "delivered_at": "2023-08-18T13:15:49.043358Z", - "replayed_at": null, - "origin": "event", - "last_attempt_at": "2023-08-18T13:15:48.446347Z", - "retry_at": null, - "times_attempted": 1, - "notification_setting_id": "ntfset_01h7hssm6xememp4cx2h562hvq" + { + "price": { + "id": "pri_01h84cdy3xatsp16afda2gekzy", + "tax_mode": "account_setting", + "product_id": "pro_01h84cd36f900f3wmpdfamgv8w", + "unit_price": { + "amount": "0", + "currency_code": "USD" + }, + "description": "Annual plan", + "trial_period": { + "interval": "day", + "frequency": 10 + }, + "billing_cycle": { + "interval": "year", + "frequency": 1 + } + }, + "status": "trialing", + "quantity": 1, + "recurring": true, + "created_at": "2023-08-18T13:15:46.864164Z", + "updated_at": "2023-08-18T13:15:46.864164Z", + "trial_dates": { + "ends_at": "2023-08-28T13:15:46.864158Z", + "starts_at": "2023-08-18T13:15:46.864158Z" + }, + "next_billed_at": "2023-08-28T13:15:46.864158Z", + "previously_billed_at": null, + "product": { + "id": "pro_01h84cd36f900f3wmpdfamgv8w", + "name": "ChatApp Pro", + "description": "Everything in basic, plus access to a suite of powerful tools and features designed to take your team's productivity to the next level.", + "tax_category": "standard", + "image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/2nmP8MQSret0aWeDemRw_icon1.png", + "status": "active", + "created_at": "2023-08-16T14:38:08.3Z", + "updated_at": "2023-08-16T14:38:08.3Z" + } + } + ], + "status": "trialing", + "paused_at": null, + "address_id": "add_01h84cjfy5411jpjes4hmafqry", + "created_at": "2023-08-18T13:15:46.864163Z", + "started_at": "2023-08-18T13:15:46.864158Z", + "updated_at": "2023-08-18T13:15:46.864163Z", + "business_id": null, + "canceled_at": null, + "custom_data": null, + "customer_id": "ctm_01h84cjfwmdph1k8kgsyjt3k7g", + "billing_cycle": { + "interval": "year", + "frequency": 1 + }, + "currency_code": "USD", + "next_billed_at": "2023-08-28T13:15:46.864158Z", + "billing_details": null, + "collection_mode": "automatic", + "first_billed_at": null, + "scheduled_change": null, + "current_billing_period": { + "ends_at": "2023-08-28T13:15:46.864158Z", + "starts_at": "2023-08-18T13:15:46.864158Z" + }, + "import_meta": null }, - { - "id": "ntf_01h8441jz6fr97hv7zemswj8cw", - "type": "customer.created", - "status": "delivered", - "payload": { - "data": { - "id": "ctm_01h8441jn5pcwrfhwh78jqt8hk", - "name": "Sam Miller", - "email": "sam@example.com", - "locale": "en", - "status": "active", - "created_at": "2023-08-18T10:46:18.533Z", - "updated_at": "2023-08-18T10:46:18.533Z", - "marketing_consent": false - }, - "event_id": "evt_01h8441jx8x1q971q9ksksqh82", - "event_type": "customer.created", - "occurred_at": "2023-08-18T10:46:18.792661Z", - "notification_id": "ntf_01h8441jz6fr97hv7zemswj8cw" - }, - "occurred_at": "2023-08-18T10:46:18.792661Z", - "delivered_at": "2023-08-18T10:46:19.396422Z", - "replayed_at": null, - "origin": "event", - "last_attempt_at": "2023-08-18T10:46:18.887423Z", - "retry_at": null, - "times_attempted": 1, - "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" + "event_id": "evt_01h84cka4p40e737vm1ajb2bc5", + "event_type": "subscription.trialing", + "occurred_at": "2023-08-18T13:15:48.246292Z", + "notification_id": "ntf_01h84cka91b65gy90qhe2tw2q6" + }, + "occurred_at": "2023-08-18T13:15:48.246292Z", + "delivered_at": "2023-08-18T13:15:49.043358Z", + "replayed_at": null, + "origin": "event", + "last_attempt_at": "2023-08-18T13:15:48.446347Z", + "retry_at": null, + "times_attempted": 1, + "notification_setting_id": "ntfset_01h7hssm6xememp4cx2h562hvq" + }, + { + "id": "ntf_01h8441jz6fr97hv7zemswj8cw", + "type": "customer.created", + "status": "delivered", + "payload": { + "data": { + "id": "ctm_01h8441jn5pcwrfhwh78jqt8hk", + "name": "Sam Miller", + "email": "sam@example.com", + "locale": "en", + "status": "active", + "created_at": "2023-08-18T10:46:18.533Z", + "updated_at": "2023-08-18T10:46:18.533Z", + "marketing_consent": false }, - { - "id": "ntf_02h8441jz6fr97hv7zemswj8cw", - "type": "adjustment.created", - "status": "delivered", - "payload": { - "data": { - "id": "adj_01hvgf2s84dr6reszzg29zbvcm", - "items": [ - { - "id": "adjitm_01hvgf2s84dr6reszzg2gx70gj", - "type": "partial", - "amount": "100", - "totals": { - "tax": "8", - "total": "100", - "subtotal": "92" - }, - "item_id": "txnitm_01hvcc94b7qgz60qmrqmbm19zw", - "proration": null - } - ], - "action": "refund", - "reason": "error", - "status": "pending_approval", - "totals": { - "fee": "5", - "tax": "8", - "total": "100", - "earnings": "87", - "subtotal": "92", - "currency_code": "USD" - }, - "created_at": "2024-04-15T08:48:20.239695Z", - "updated_at": "2024-04-15T08:48:20.239695Z", - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "currency_code": "USD", - "payout_totals": { - "fee": "5", - "tax": "8", - "total": "100", - "earnings": "87", - "subtotal": "92", - "currency_code": "USD" - }, - "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y", - "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430", - "credit_applied_to_balance": null, - "tax_rates_used": [ - { - "totals": { - "tax": "11000", - "total": "66000", - "subtotal": "55000" - }, - "tax_rate": "0.2" - } - ] + "event_id": "evt_01h8441jx8x1q971q9ksksqh82", + "event_type": "customer.created", + "occurred_at": "2023-08-18T10:46:18.792661Z", + "notification_id": "ntf_01h8441jz6fr97hv7zemswj8cw" + }, + "occurred_at": "2023-08-18T10:46:18.792661Z", + "delivered_at": "2023-08-18T10:46:19.396422Z", + "replayed_at": null, + "origin": "event", + "last_attempt_at": "2023-08-18T10:46:18.887423Z", + "retry_at": null, + "times_attempted": 1, + "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" + }, + { + "id": "ntf_02h8441jz6fr97hv7zemswj8cw", + "type": "adjustment.created", + "status": "delivered", + "payload": { + "data": { + "id": "adj_01hvgf2s84dr6reszzg29zbvcm", + "items": [ + { + "id": "adjitm_01hvgf2s84dr6reszzg2gx70gj", + "type": "partial", + "amount": "100", + "totals": { + "tax": "8", + "total": "100", + "subtotal": "92" + }, + "item_id": "txnitm_01hvcc94b7qgz60qmrqmbm19zw", + "proration": null + } + ], + "action": "refund", + "reason": "error", + "status": "pending_approval", + "totals": { + "fee": "5", + "tax": "8", + "total": "100", + "earnings": "87", + "subtotal": "92", + "currency_code": "USD" + }, + "created_at": "2024-04-15T08:48:20.239695Z", + "updated_at": "2024-04-15T08:48:20.239695Z", + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "currency_code": "USD", + "payout_totals": { + "fee": "5", + "tax": "8", + "total": "100", + "earnings": "87", + "subtotal": "92", + "currency_code": "USD" + }, + "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y", + "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430", + "credit_applied_to_balance": null, + "tax_rates_used": [ + { + "totals": { + "tax": "11000", + "total": "66000", + "subtotal": "55000" + }, + "tax_rate": "0.2" + } + ] + }, + "event_id": "evt_02h8441jx8x1q971q9ksksqh82", + "event_type": "adjustment.created", + "occurred_at": "2023-08-18T10:46:18.792661Z", + "notification_id": "ntf_02h8441jz6fr97hv7zemswj8cw" + }, + "occurred_at": "2023-08-18T10:46:18.792661Z", + "delivered_at": "2023-08-18T10:46:19.396422Z", + "replayed_at": null, + "origin": "event", + "last_attempt_at": "2023-08-18T10:46:18.887423Z", + "retry_at": null, + "times_attempted": 1, + "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" + }, + { + "id": "ntf_03h8441jz6fr97hv7zemswj8cw", + "type": "adjustment.created", + "status": "delivered", + "payload": { + "data": { + "id": "adj_01hvgf2s84dr6reszzg29zbvcm", + "items": [ + { + "id": "adjitm_01hvgf2s84dr6reszzg2gx70gj", + "type": "partial", + "amount": "100", + "totals": { + "tax": "8", + "total": "100", + "subtotal": "92" + }, + "item_id": "txnitm_01hvcc94b7qgz60qmrqmbm19zw", + "proration": null + } + ], + "action": "refund", + "reason": "error", + "status": "pending_approval", + "totals": { + "fee": "5", + "tax": "8", + "total": "100", + "earnings": "87", + "subtotal": "92", + "currency_code": "USD" + }, + "created_at": "2024-04-15T08:48:20.239695Z", + "updated_at": "2024-04-15T08:48:20.239695Z", + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "currency_code": "USD", + "payout_totals": { + "fee": "5", + "tax": "8", + "total": "100", + "earnings": "87", + "subtotal": "92", + "currency_code": "USD" + }, + "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y", + "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430", + "credit_applied_to_balance": null + }, + "event_id": "evt_03h8441jx8x1q971q9ksksqh82", + "event_type": "adjustment.created", + "occurred_at": "2023-08-18T10:46:18.792661Z", + "notification_id": "ntf_03h8441jz6fr97hv7zemswj8cw" + }, + "occurred_at": "2023-08-18T10:46:18.792661Z", + "delivered_at": "2023-08-18T10:46:19.396422Z", + "replayed_at": null, + "origin": "event", + "last_attempt_at": "2023-08-18T10:46:18.887423Z", + "retry_at": null, + "times_attempted": 1, + "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" + }, + { + "id": "ntf_01hv8x2azy7scaan4s0eb0273x", + "type": "transaction.revised", + "status": "delivered", + "payload": { + "data": { + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" + }, + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - "event_id": "evt_02h8441jx8x1q971q9ksksqh82", - "event_type": "adjustment.created", - "occurred_at": "2023-08-18T10:46:18.792661Z", - "notification_id": "ntf_02h8441jz6fr97hv7zemswj8cw" + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null }, - "occurred_at": "2023-08-18T10:46:18.792661Z", - "delivered_at": "2023-08-18T10:46:19.396422Z", - "replayed_at": null, - "origin": "event", - "last_attempt_at": "2023-08-18T10:46:18.887423Z", - "retry_at": null, - "times_attempted": 1, - "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" - }, - { - "id": "ntf_03h8441jz6fr97hv7zemswj8cw", - "type": "adjustment.created", - "status": "delivered", - "payload": { - "data": { - "id": "adj_01hvgf2s84dr6reszzg29zbvcm", - "items": [ - { - "id": "adjitm_01hvgf2s84dr6reszzg2gx70gj", - "type": "partial", - "amount": "100", - "totals": { - "tax": "8", - "total": "100", - "subtotal": "92" - }, - "item_id": "txnitm_01hvcc94b7qgz60qmrqmbm19zw", - "proration": null - } - ], - "action": "refund", - "reason": "error", - "status": "pending_approval", - "totals": { - "fee": "5", - "tax": "8", - "total": "100", - "earnings": "87", - "subtotal": "92", - "currency_code": "USD" - }, - "created_at": "2024-04-15T08:48:20.239695Z", - "updated_at": "2024-04-15T08:48:20.239695Z", - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "currency_code": "USD", - "payout_totals": { - "fee": "5", - "tax": "8", - "total": "100", - "earnings": "87", - "subtotal": "92", - "currency_code": "USD" - }, - "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y", - "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430", - "credit_applied_to_balance": null - }, - "event_id": "evt_03h8441jx8x1q971q9ksksqh82", - "event_type": "adjustment.created", - "occurred_at": "2023-08-18T10:46:18.792661Z", - "notification_id": "ntf_03h8441jz6fr97hv7zemswj8cw" + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null }, - "occurred_at": "2023-08-18T10:46:18.792661Z", - "delivered_at": "2023-08-18T10:46:19.396422Z", - "replayed_at": null, - "origin": "event", - "last_attempt_at": "2023-08-18T10:46:18.887423Z", - "retry_at": null, - "times_attempted": 1, - "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" - }, - { - "id": "ntf_01hv8x2azy7scaan4s0eb0273x", - "type": "transaction.revised", - "status": "delivered", - "payload": { - "data": { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null - }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "completed", - "details": { - "totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" - }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605Z", - "updated_at": "2024-04-05T15:53:44.687Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302Z", - "updated_at": "2024-04-05T15:47:17.163Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441Z", - "updated_at": "2024-04-05T15:43:28.971Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - } - } - ], - "payout_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" - }, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD" - } - }, - "checkout": { - "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "completed", + "details": { + "totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" + }, + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605Z", + "updated_at": "2024-04-05T15:53:44.687Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "payments": [ - { - "amount": "65215", - "status": "captured", - "created_at": "2024-04-12T10:18:33.579142Z", - "error_code": null, - "captured_at": "2024-04-12T10:18:47.635628Z", - "method_details": { - "card": { - "type": "visa", - "last4": "3184", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card" - }, - "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", - "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", - "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" - }, - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "0002", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card" - }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" - } + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" ], - "billed_at": "2024-04-12T10:18:48.294633Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.2014Z", - "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx", - "updated_at": "2024-04-12T10:18:49.738971238Z", - "revised_at": "2024-04-12T10:18:49.738972238Z", - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": { - "ends_at": "2024-05-12T10:18:47.635628Z", - "starts_at": "2024-04-12T10:18:47.635628Z" - }, - "invoice_number": "325-10566", - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" - }, - "event_id": "evt_01hv8x2axb33yr5y238zfwcn5p", - "event_type": "transaction.revised", - "occurred_at": "2024-04-12T10:18:50.155553Z", - "notification_id": "ntf_01hv8x2azy7scaan4s0eb0273x" + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" + } + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302Z", + "updated_at": "2024-04-05T15:47:17.163Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + } + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441Z", + "updated_at": "2024-04-05T15:43:28.971Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + } + } + ], + "payout_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" }, - "occurred_at": "2023-08-18T10:46:18.792661Z", - "delivered_at": "2023-08-18T10:46:19.396422Z", - "replayed_at": null, - "origin": "event", - "last_attempt_at": "2023-08-18T10:46:18.887423Z", - "retry_at": null, - "times_attempted": 1, - "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" - } - ], - "meta": { - "pagination": { - "per_page": 50, - "estimated_total": 5, - "next": "https://api.paddle.com/notifications?after=ntf_01h8441jz6fr97hv7zemswj8cw", - "has_more": false + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "grand_total_tax": "5315" + } + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [ + { + "amount": "65215", + "status": "captured", + "created_at": "2024-04-12T10:18:33.579142Z", + "error_code": null, + "captured_at": "2024-04-12T10:18:47.635628Z", + "method_details": { + "card": { + "type": "visa", + "last4": "3184", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card" + }, + "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", + "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", + "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + }, + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "0002", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card" + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + } + ], + "billed_at": "2024-04-12T10:18:48.294633Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.2014Z", + "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx", + "updated_at": "2024-04-12T10:18:49.738971238Z", + "revised_at": "2024-04-12T10:18:49.738972238Z", + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": { + "ends_at": "2024-05-12T10:18:47.635628Z", + "starts_at": "2024-04-12T10:18:47.635628Z" + }, + "invoice_number": "325-10566", + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" }, - "request_id": "21279f36-3eee-4828-943b-e2a9a6df4fce" + "event_id": "evt_01hv8x2axb33yr5y238zfwcn5p", + "event_type": "transaction.revised", + "occurred_at": "2024-04-12T10:18:50.155553Z", + "notification_id": "ntf_01hv8x2azy7scaan4s0eb0273x" + }, + "occurred_at": "2023-08-18T10:46:18.792661Z", + "delivered_at": "2023-08-18T10:46:19.396422Z", + "replayed_at": null, + "origin": "event", + "last_attempt_at": "2023-08-18T10:46:18.887423Z", + "retry_at": null, + "times_attempted": 1, + "notification_setting_id": "ntfset_01h7zcdzf04a7wvyja9k9p1n3p" } + ], + "meta": { + "pagination": { + "per_page": 50, + "estimated_total": 5, + "next": "https://api.paddle.com/notifications?after=ntf_01h8441jz6fr97hv7zemswj8cw", + "has_more": false + }, + "request_id": "21279f36-3eee-4828-943b-e2a9a6df4fce" + } } diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.billed.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.billed.json index a2566ebd..551d3b5f 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.billed.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.billed.json @@ -1,275 +1,277 @@ { - "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", - "items": [ - { - "price": { - "id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "name": "Annual (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:57:54.249913Z", - "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "unit_price": { - "amount": "50000", - "currency_code": "USD" - }, - "updated_at": "2024-04-05T14:32:00.471447Z", - "custom_data": null, - "description": "Annual", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 50, - "proration": null - }, - { - "price": { - "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "name": "Annual (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:00:40.265185Z", - "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "unit_price": { - "amount": "300000", - "currency_code": "USD" - }, - "updated_at": "2024-03-25T14:31:18.587603Z", - "custom_data": null, - "description": "Annual (recurring addon)", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", + "items": [ + { + "price": { + "id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "name": "Annual (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "api", - "status": "billed", - "details": { - "totals": { - "fee": null, - "tax": "225239", - "total": "2763149", - "credit": "0", - "balance": "2763149", - "discount": "281990", - "earnings": null, - "subtotal": "2819900", - "grand_total": "2763149", - "currency_code": "USD", - "credit_to_balance": "0" + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:57:54.249913Z", + "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "unit_price": { + "amount": "50000", + "currency_code": "USD" }, - "line_items": [ - { - "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", - "totals": { - "tax": "199687", - "total": "2449687", - "discount": "250000", - "subtotal": "2500000" - }, - "product": { - "id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "name": "AeroEdit Enterprise", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/Ws808ziTS76a6YbnMkiK_enterprise.png", - "created_at": "2023-02-23T12:44:34.923000Z", - "updated_at": "2024-04-05T15:58:28.309000Z", - "custom_data": { - "features": { - "sso": true, - "route_planning": true, - "payment_by_invoice": true, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [], - "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." - }, - "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "quantity": 50, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "3994", - "total": "48994", - "discount": "5000", - "subtotal": "50000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", - "totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "product": { - "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "name": "VIP support", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/qgyipKJwRtq98YNboipo_vip-support.png", - "created_at": "2023-02-23T13:58:17.615000Z", - "updated_at": "2024-04-05T15:44:02.893000Z", - "custom_data": null, - "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", - "totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "proration": null - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "225239", - "total": "2763149", - "discount": "281990", - "subtotal": "2819900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "225239", - "total": "2763149", - "earnings": "0", - "subtotal": "2537910", - "grand_total": "2763149", - "currency_code": "USD", - "retained_fee": "0" + "updated_at": "2024-04-05T14:32:00.471447Z", + "custom_data": null, + "description": "Annual", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 }, - "adjusted_payout_totals": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 50, + "proration": null }, - "checkout": { - "url": null + { + "price": { + "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "name": "Annual (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:00:40.265185Z", + "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "unit_price": { + "amount": "300000", + "currency_code": "USD" + }, + "updated_at": "2024-03-25T14:31:18.587603Z", + "custom_data": null, + "description": "Annual (recurring addon)", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null }, - "payments": [], - "billed_at": "2024-04-12T10:30:27.198043Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T07:40:38.007040Z", - "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", - "updated_at": "2024-04-12T10:30:27.584874Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", - "currency_code": "USD", - "billing_period": { - "ends_at": "2025-04-11T23:59:00.000000Z", - "starts_at": "2024-04-12T00:00:00.000000Z" + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "api", + "status": "billed", + "details": { + "totals": { + "fee": null, + "tax": "225239", + "total": "2763149", + "credit": "0", + "balance": "2763149", + "discount": "281990", + "earnings": null, + "subtotal": "2819900", + "grand_total": "2763149", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "225239" }, - "invoice_number": null, - "billing_details": { - "payment_terms": { - "interval": "day", - "frequency": 14 + "line_items": [ + { + "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", + "totals": { + "tax": "199687", + "total": "2449687", + "discount": "250000", + "subtotal": "2500000" + }, + "product": { + "id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "name": "AeroEdit Enterprise", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/Ws808ziTS76a6YbnMkiK_enterprise.png", + "created_at": "2023-02-23T12:44:34.923000Z", + "updated_at": "2024-04-05T15:58:28.309000Z", + "custom_data": { + "features": { + "sso": true, + "route_planning": true, + "payment_by_invoice": true, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true + }, + "suggested_addons": [], + "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." + }, + "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "quantity": 50, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "3994", + "total": "48994", + "discount": "5000", + "subtotal": "50000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", + "totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" + }, + "product": { + "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "name": "VIP support", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png", + "created_at": "2023-02-23T13:58:17.615000Z", + "updated_at": "2024-04-05T15:44:02.893000Z", + "custom_data": null, + "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", + "totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" }, - "enable_checkout": false, - "purchase_order_number": "PO-123", - "additional_information": null + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + }, + "proration": null + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "225239", + "total": "2763149", + "discount": "281990", + "subtotal": "2819900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "0", + "tax": "225239", + "total": "2763149", + "earnings": "0", + "subtotal": "2537910", + "grand_total": "2763149", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "225239" + }, + "adjusted_payout_totals": null + }, + "checkout": { + "url": null + }, + "payments": [], + "billed_at": "2024-04-12T10:30:27.198043Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T07:40:38.007040Z", + "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", + "updated_at": "2024-04-12T10:30:27.584874Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", + "currency_code": "USD", + "billing_period": { + "ends_at": "2025-04-11T23:59:00.000000Z", + "starts_at": "2024-04-12T00:00:00.000000Z" + }, + "invoice_number": null, + "billing_details": { + "payment_terms": { + "interval": "day", + "frequency": 14 }, - "collection_mode": "manual", - "subscription_id": null -} \ No newline at end of file + "enable_checkout": false, + "purchase_order_number": "PO-123", + "additional_information": null + }, + "collection_mode": "manual", + "subscription_id": null +} diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.canceled.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.canceled.json index ff894336..b3a964bc 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.canceled.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.canceled.json @@ -1,275 +1,277 @@ { - "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", - "items": [ - { - "price": { - "id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "name": "Annual (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:57:54.249913Z", - "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "unit_price": { - "amount": "50000", - "currency_code": "USD" - }, - "updated_at": "2024-04-05T14:32:00.471447Z", - "custom_data": null, - "description": "Annual", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 50, - "proration": null - }, - { - "price": { - "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "name": "Annual (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:00:40.265185Z", - "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "unit_price": { - "amount": "300000", - "currency_code": "USD" - }, - "updated_at": "2024-03-25T14:31:18.587603Z", - "custom_data": null, - "description": "Annual (recurring addon)", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", + "items": [ + { + "price": { + "id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "name": "Annual (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "api", - "status": "canceled", - "details": { - "totals": { - "fee": null, - "tax": "225239", - "total": "2763149", - "credit": "0", - "balance": "2763149", - "discount": "281990", - "earnings": null, - "subtotal": "2819900", - "grand_total": "2763149", - "currency_code": "USD", - "credit_to_balance": "0" + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:57:54.249913Z", + "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "unit_price": { + "amount": "50000", + "currency_code": "USD" }, - "line_items": [ - { - "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", - "totals": { - "tax": "199687", - "total": "2449687", - "discount": "250000", - "subtotal": "2500000" - }, - "product": { - "id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "name": "AeroEdit Enterprise", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/Ws808ziTS76a6YbnMkiK_enterprise.png", - "created_at": "2023-02-23T12:44:34.923000Z", - "updated_at": "2024-04-05T15:58:28.309000Z", - "custom_data": { - "features": { - "sso": true, - "route_planning": true, - "payment_by_invoice": true, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [], - "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." - }, - "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "quantity": 50, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "3994", - "total": "48994", - "discount": "5000", - "subtotal": "50000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", - "totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "product": { - "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "name": "VIP support", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/qgyipKJwRtq98YNboipo_vip-support.png", - "created_at": "2023-02-23T13:58:17.615000Z", - "updated_at": "2024-04-05T15:44:02.893000Z", - "custom_data": null, - "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", - "totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "proration": null - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "225239", - "total": "2763149", - "discount": "281990", - "subtotal": "2819900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "225239", - "total": "2763149", - "earnings": "0", - "subtotal": "2537910", - "grand_total": "2763149", - "currency_code": "USD", - "retained_fee": "0" + "updated_at": "2024-04-05T14:32:00.471447Z", + "custom_data": null, + "description": "Annual", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 }, - "adjusted_payout_totals": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 50, + "proration": null }, - "checkout": { - "url": null + { + "price": { + "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "name": "Annual (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:00:40.265185Z", + "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "unit_price": { + "amount": "300000", + "currency_code": "USD" + }, + "updated_at": "2024-03-25T14:31:18.587603Z", + "custom_data": null, + "description": "Annual (recurring addon)", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null }, - "payments": [], - "billed_at": "2024-04-12T10:30:27.198043Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T07:40:38.007040Z", - "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", - "updated_at": "2024-04-12T10:31:27.360716Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", - "currency_code": "USD", - "billing_period": { - "ends_at": "2025-04-11T23:59:00.000000Z", - "starts_at": "2024-04-12T00:00:00.000000Z" + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "api", + "status": "canceled", + "details": { + "totals": { + "fee": null, + "tax": "225239", + "total": "2763149", + "credit": "0", + "balance": "2763149", + "discount": "281990", + "earnings": null, + "subtotal": "2819900", + "grand_total": "2763149", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "225239" }, - "invoice_number": "325-10567", - "billing_details": { - "payment_terms": { - "interval": "day", - "frequency": 14 + "line_items": [ + { + "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", + "totals": { + "tax": "199687", + "total": "2449687", + "discount": "250000", + "subtotal": "2500000" + }, + "product": { + "id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "name": "AeroEdit Enterprise", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/Ws808ziTS76a6YbnMkiK_enterprise.png", + "created_at": "2023-02-23T12:44:34.923000Z", + "updated_at": "2024-04-05T15:58:28.309000Z", + "custom_data": { + "features": { + "sso": true, + "route_planning": true, + "payment_by_invoice": true, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true + }, + "suggested_addons": [], + "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." + }, + "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "quantity": 50, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "3994", + "total": "48994", + "discount": "5000", + "subtotal": "50000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", + "totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" + }, + "product": { + "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "name": "VIP support", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png", + "created_at": "2023-02-23T13:58:17.615000Z", + "updated_at": "2024-04-05T15:44:02.893000Z", + "custom_data": null, + "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", + "totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" }, - "enable_checkout": false, - "purchase_order_number": "PO-123", - "additional_information": null + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + }, + "proration": null + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "225239", + "total": "2763149", + "discount": "281990", + "subtotal": "2819900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "0", + "tax": "225239", + "total": "2763149", + "earnings": "0", + "subtotal": "2537910", + "grand_total": "2763149", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "225239" + }, + "adjusted_payout_totals": null + }, + "checkout": { + "url": null + }, + "payments": [], + "billed_at": "2024-04-12T10:30:27.198043Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T07:40:38.007040Z", + "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", + "updated_at": "2024-04-12T10:31:27.360716Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", + "currency_code": "USD", + "billing_period": { + "ends_at": "2025-04-11T23:59:00.000000Z", + "starts_at": "2024-04-12T00:00:00.000000Z" + }, + "invoice_number": "325-10567", + "billing_details": { + "payment_terms": { + "interval": "day", + "frequency": 14 }, - "collection_mode": "manual", - "subscription_id": "sub_01hv8xqmay5w5rfsnzkxzgy0yp" -} \ No newline at end of file + "enable_checkout": false, + "purchase_order_number": "PO-123", + "additional_information": null + }, + "collection_mode": "manual", + "subscription_id": "sub_01hv8xqmay5w5rfsnzkxzgy0yp" +} diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.completed.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.completed.json index bf5f1c3e..9fbf06ff 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.completed.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.completed.json @@ -1,329 +1,332 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "completed", - "details": { - "totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "proration": null - } - ], - "payout_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0", - "exchange_rate": "0.70194147", - "fee_rate": "0" + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" }, - "adjusted_payout_totals": null + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "completed", + "details": { + "totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" }, - "payments": [ - { - "amount": "65215", - "status": "captured", - "created_at": "2024-04-12T10:18:33.579142Z", - "error_code": null, - "captured_at": "2024-04-12T10:18:47.635628Z", - "method_details": { - "card": { - "type": "visa", - "last4": "3184", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", - "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", - "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" }, - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "0002", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" - } + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "proration": null + } ], - "billed_at": "2024-04-12T10:18:48.294633Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx", - "updated_at": "2024-04-12T10:18:49.738971Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": { - "ends_at": "2024-05-12T10:18:47.635628Z", - "starts_at": "2024-04-12T10:18:47.635628Z" + "payout_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "exchange_rate": "0.70194147", + "fee_rate": "0", + "grand_total_tax": "5315" }, - "invoice_number": "325-10566", - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" -} \ No newline at end of file + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" + }, + "adjusted_payout_totals": null + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [ + { + "amount": "65215", + "status": "captured", + "created_at": "2024-04-12T10:18:33.579142Z", + "error_code": null, + "captured_at": "2024-04-12T10:18:47.635628Z", + "method_details": { + "card": { + "type": "visa", + "last4": "3184", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", + "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", + "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + }, + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "0002", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + } + ], + "billed_at": "2024-04-12T10:18:48.294633Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx", + "updated_at": "2024-04-12T10:18:49.738971Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": { + "ends_at": "2024-05-12T10:18:47.635628Z", + "starts_at": "2024-04-12T10:18:47.635628Z" + }, + "invoice_number": "325-10566", + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" +} diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.created.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.created.json index e87249e0..7d6643e9 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.created.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.created.json @@ -1,267 +1,269 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "draft", - "details": { + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "draft", + "details": { + "totals": { + "fee": null, + "tax": "9585", + "total": "57509", + "credit": "0", + "balance": "57509", + "discount": "0", + "earnings": null, + "subtotal": "47924", + "grand_total": "57509", + "currency_code": "GBP", + "credit_to_balance": "0", + "grand_total_tax": "9585" + }, + "line_items": [ + { + "id": "txnitm_01hv8wpts6n6wkcr973fmt6gt7", "totals": { - "fee": null, - "tax": "9585", - "total": "57509", - "credit": "0", - "balance": "57509", - "discount": "0", - "earnings": null, - "subtotal": "47924", - "grand_total": "57509", - "currency_code": "GBP", - "credit_to_balance": "0" + "tax": "4800", + "total": "28800", + "discount": "0", + "subtotal": "24000" }, - "line_items": [ - { - "id": "txnitm_01hv8wpts6n6wkcr973fmt6gt7", - "totals": { - "tax": "4800", - "total": "28800", - "discount": "0", - "subtotal": "24000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.2", - "unit_totals": { - "tax": "480", - "total": "2880", - "discount": "0", - "subtotal": "2400" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wpts6n6wkcr973jywgjzx", - "totals": { - "tax": "1600", - "total": "9601", - "discount": "0", - "subtotal": "8001" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.2", - "unit_totals": { - "tax": "1600", - "total": "9601", - "discount": "0", - "subtotal": "8001" - }, - "proration": null + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - { - "id": "txnitm_01hv8wpts6n6wkcr973nc9r7dm", - "totals": { - "tax": "3185", - "total": "19108", - "discount": "0", - "subtotal": "15923" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.2", - "unit_totals": { - "tax": "3185", - "total": "19108", - "discount": "0", - "subtotal": "15923" - }, - "proration": null - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "9585", - "total": "57509", - "discount": "0", - "subtotal": "47924" - }, - "tax_rate": "0.2" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "9585", - "total": "57509", - "earnings": "0", - "subtotal": "47924", - "grand_total": "57509", - "currency_code": "GBP", - "retained_fee": "0" + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null }, - "adjusted_payout_totals": null - }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.2", + "unit_totals": { + "tax": "480", + "total": "2880", + "discount": "0", + "subtotal": "2400" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wpts6n6wkcr973jywgjzx", + "totals": { + "tax": "1600", + "total": "9601", + "discount": "0", + "subtotal": "8001" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.2", + "unit_totals": { + "tax": "1600", + "total": "9601", + "discount": "0", + "subtotal": "8001" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wpts6n6wkcr973nc9r7dm", + "totals": { + "tax": "3185", + "total": "19108", + "discount": "0", + "subtotal": "15923" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.2", + "unit_totals": { + "tax": "3185", + "total": "19108", + "discount": "0", + "subtotal": "15923" + }, + "proration": null + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "9585", + "total": "57509", + "discount": "0", + "subtotal": "47924" + }, + "tax_rate": "0.2" + } + ], + "adjusted_totals": { + "fee": "0", + "tax": "9585", + "total": "57509", + "earnings": "0", + "subtotal": "47924", + "grand_total": "57509", + "currency_code": "GBP", + "retained_fee": "0", + "grand_total_tax": "9585" }, - "payments": [], - "billed_at": null, - "address_id": null, - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:12:33.201400Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": null, - "discount_id": null, - "currency_code": "GBP", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null -} \ No newline at end of file + "adjusted_payout_totals": null + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [], + "billed_at": null, + "address_id": null, + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:12:33.201400Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": null, + "discount_id": null, + "currency_code": "GBP", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null +} diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.paid.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.paid.json index f7895e51..a88bd851 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.paid.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.paid.json @@ -1,312 +1,314 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "paid", - "details": { - "totals": { - "fee": null, - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": null, - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "proration": null - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "5315", - "total": "65215", - "earnings": "0", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - "adjusted_payout_totals": null + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "paid", + "details": { + "totals": { + "fee": null, + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": null, + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" }, - "payments": [ - { - "amount": "65215", - "status": "captured", - "created_at": "2024-04-12T10:18:33.579142Z", - "error_code": null, - "captured_at": "2024-04-12T10:18:47.635628Z", - "method_details": { - "card": { - "type": "visa", - "last4": "3184", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", - "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", - "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" }, - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "0002", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" - } + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "proration": null + } ], - "billed_at": "2024-04-12T10:18:48.294633Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:18:48.294635Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null -} \ No newline at end of file + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "0", + "tax": "5315", + "total": "65215", + "earnings": "0", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" + }, + "adjusted_payout_totals": null + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [ + { + "amount": "65215", + "status": "captured", + "created_at": "2024-04-12T10:18:33.579142Z", + "error_code": null, + "captured_at": "2024-04-12T10:18:47.635628Z", + "method_details": { + "card": { + "type": "visa", + "last4": "3184", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", + "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", + "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + }, + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "0002", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + } + ], + "billed_at": "2024-04-12T10:18:48.294633Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:18:48.294635Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null +} diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.past_due.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.past_due.json index c17c8700..9cb2e267 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.past_due.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.past_due.json @@ -1,257 +1,259 @@ { - "id": "txn_01hv8xbtmb6zc7c264ycteehth", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": { - "rate": "1", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - } - } + "id": "txn_01hv8xbtmb6zc7c264ycteehth", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": { - "rate": "1", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - } - } - } - ], - "origin": "subscription_recurring", - "status": "past_due", - "details": { - "totals": { - "fee": null, - "tax": "3549", - "total": "43549", - "credit": "0", - "balance": "43549", - "discount": "0", - "earnings": null, - "subtotal": "40000", - "grand_total": "43549", - "currency_code": "USD", - "credit_to_balance": "0" + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - "line_items": [ - { - "id": "txnitm_01hv8xbv0wdggp4a9338b18ckn", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.08875", - "proration": { - "rate": "1", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - } - }, - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01hv8xbv0wdggp4a933cx2m9qc", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.08875", - "proration": { - "rate": "1", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - } - }, - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "3549", - "total": "43549", - "discount": "0", - "subtotal": "40000" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "3549", - "total": "43549", - "earnings": "0", - "subtotal": "40000", - "grand_total": "43549", - "currency_code": "USD", - "retained_fee": "0" + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - "adjusted_payout_totals": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": { + "rate": "1", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + } + } }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8xbtmb6zc7c264ycteehth" + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": { + "rate": "1", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + } + } + } + ], + "origin": "subscription_recurring", + "status": "past_due", + "details": { + "totals": { + "fee": null, + "tax": "3549", + "total": "43549", + "credit": "0", + "balance": "43549", + "discount": "0", + "earnings": null, + "subtotal": "40000", + "grand_total": "43549", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "3549" }, - "payments": [ - { - "amount": "43549", - "status": "error", - "created_at": "2024-04-12T10:24:01.692772Z", - "error_code": "authentication_failed", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "3184", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null + "line_items": [ + { + "id": "txnitm_01hv8xbv0wdggp4a9338b18ckn", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", - "payment_attempt_id": "ff8123f6-9cfc-4f04-9984-75e4ad04b169", - "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.08875", + "proration": { + "rate": "1", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + } + }, + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" + } + }, + { + "id": "txnitm_01hv8xbv0wdggp4a933cx2m9qc", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.08875", + "proration": { + "rate": "1", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + } + }, + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" } + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "3549", + "total": "43549", + "discount": "0", + "subtotal": "40000" + }, + "tax_rate": "0.08875" + } ], - "billed_at": "2024-04-12T10:24:01.163479Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:24:01.588479Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:24:03.197001Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" + "adjusted_totals": { + "fee": "0", + "tax": "3549", + "total": "43549", + "earnings": "0", + "subtotal": "40000", + "grand_total": "43549", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "3549" }, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" -} \ No newline at end of file + "adjusted_payout_totals": null + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8xbtmb6zc7c264ycteehth" + }, + "payments": [ + { + "amount": "43549", + "status": "error", + "created_at": "2024-04-12T10:24:01.692772Z", + "error_code": "authentication_failed", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "3184", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", + "payment_attempt_id": "ff8123f6-9cfc-4f04-9984-75e4ad04b169", + "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + } + ], + "billed_at": "2024-04-12T10:24:01.163479Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:24:01.588479Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:24:03.197001Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + }, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" +} diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.payment_failed.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.payment_failed.json index 661674c4..4ee30aa5 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.payment_failed.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.payment_failed.json @@ -1,290 +1,292 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "ready", - "details": { - "totals": { - "fee": null, - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "65215", - "discount": "0", - "earnings": null, - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "proration": null - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "5315", - "total": "65215", - "earnings": "0", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - "adjusted_payout_totals": null + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "ready", + "details": { + "totals": { + "fee": null, + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "65215", + "discount": "0", + "earnings": null, + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" }, - "payments": [ - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "0002", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" - } + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "proration": null + } ], - "billed_at": null, - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:14:26.325076Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null -} \ No newline at end of file + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "0", + "tax": "5315", + "total": "65215", + "earnings": "0", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" + }, + "adjusted_payout_totals": null + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [ + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "0002", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + } + ], + "billed_at": null, + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:14:26.325076Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null +} diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.ready.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.ready.json index 5296f242..7f2fdf01 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.ready.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.ready.json @@ -1,267 +1,269 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "ready", - "details": { + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "ready", + "details": { + "totals": { + "fee": null, + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "65215", + "discount": "0", + "earnings": null, + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" + }, + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", "totals": { - "fee": null, - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "65215", - "discount": "0", - "earnings": null, - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "proration": null + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "proration": null - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "5315", - "total": "65215", - "earnings": "0", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null }, - "adjusted_payout_totals": null - }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "proration": null + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "0", + "tax": "5315", + "total": "65215", + "earnings": "0", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" }, - "payments": [], - "billed_at": null, - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:14:26.325076Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null -} \ No newline at end of file + "adjusted_payout_totals": null + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [], + "billed_at": null, + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:14:26.325076Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null +} diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.revised.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.revised.json index de2b2815..18033c14 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.revised.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.revised.json @@ -1,267 +1,269 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "ready", - "details": { + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "ready", + "details": { + "totals": { + "fee": null, + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "65215", + "discount": "0", + "earnings": null, + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" + }, + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", "totals": { - "fee": null, - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "65215", - "discount": "0", - "earnings": null, - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "proration": null + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "proration": null - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "5315", - "total": "65215", - "earnings": "0", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null }, - "adjusted_payout_totals": null - }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "proration": null + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "0", + "tax": "5315", + "total": "65215", + "earnings": "0", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" }, - "payments": [], - "billed_at": null, - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:14:26.325076Z", - "revised_at": "2024-04-12T10:14:26.325076Z", - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null + "adjusted_payout_totals": null + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [], + "billed_at": null, + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:14:26.325076Z", + "revised_at": "2024-04-12T10:14:26.325076Z", + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null } diff --git a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.updated.json b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.updated.json index df408eb2..0fa742f2 100644 --- a/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.updated.json +++ b/tests/Functional/Resources/Simulations/_fixtures/payload/transaction.updated.json @@ -1,275 +1,277 @@ { - "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", - "items": [ - { - "price": { - "id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "name": "Annual (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:57:54.249913Z", - "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "unit_price": { - "amount": "50000", - "currency_code": "USD" - }, - "updated_at": "2024-04-05T14:32:00.471447Z", - "custom_data": null, - "description": "Annual", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 50, - "proration": null - }, - { - "price": { - "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "name": "Annual (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:00:40.265185Z", - "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "unit_price": { - "amount": "300000", - "currency_code": "USD" - }, - "updated_at": "2024-03-25T14:31:18.587603Z", - "custom_data": null, - "description": "Annual (recurring addon)", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", + "items": [ + { + "price": { + "id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "name": "Annual (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "api", - "status": "ready", - "details": { - "totals": { - "fee": null, - "tax": "225239", - "total": "2763149", - "credit": "0", - "balance": "2763149", - "discount": "281990", - "earnings": null, - "subtotal": "2819900", - "grand_total": "2763149", - "currency_code": "USD", - "credit_to_balance": "0" + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:57:54.249913Z", + "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "unit_price": { + "amount": "50000", + "currency_code": "USD" }, - "line_items": [ - { - "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", - "totals": { - "tax": "199687", - "total": "2449687", - "discount": "250000", - "subtotal": "2500000" - }, - "product": { - "id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "name": "AeroEdit Enterprise", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/Ws808ziTS76a6YbnMkiK_enterprise.png", - "created_at": "2023-02-23T12:44:34.923000Z", - "updated_at": "2024-04-05T15:58:28.309000Z", - "custom_data": { - "features": { - "sso": true, - "route_planning": true, - "payment_by_invoice": true, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [], - "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." - }, - "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "quantity": 50, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "3994", - "total": "48994", - "discount": "5000", - "subtotal": "50000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", - "totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "product": { - "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "name": "VIP support", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/qgyipKJwRtq98YNboipo_vip-support.png", - "created_at": "2023-02-23T13:58:17.615000Z", - "updated_at": "2024-04-05T15:44:02.893000Z", - "custom_data": null, - "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "proration": null - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", - "totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "proration": null - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "225239", - "total": "2763149", - "discount": "281990", - "subtotal": "2819900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_totals": { - "fee": "0", - "tax": "225239", - "total": "2763149", - "earnings": "0", - "subtotal": "2537910", - "grand_total": "2763149", - "currency_code": "USD", - "retained_fee": "0" + "updated_at": "2024-04-05T14:32:00.471447Z", + "custom_data": null, + "description": "Annual", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 }, - "adjusted_payout_totals": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 50, + "proration": null }, - "checkout": { - "url": null + { + "price": { + "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "name": "Annual (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:00:40.265185Z", + "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "unit_price": { + "amount": "300000", + "currency_code": "USD" + }, + "updated_at": "2024-03-25T14:31:18.587603Z", + "custom_data": null, + "description": "Annual (recurring addon)", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null }, - "payments": [], - "billed_at": null, - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T07:40:38.007040Z", - "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", - "updated_at": "2024-04-12T10:00:03.871169Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", - "currency_code": "USD", - "billing_period": { - "ends_at": "2025-04-11T23:59:00.000000Z", - "starts_at": "2024-04-12T00:00:00.000000Z" + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "api", + "status": "ready", + "details": { + "totals": { + "fee": null, + "tax": "225239", + "total": "2763149", + "credit": "0", + "balance": "2763149", + "discount": "281990", + "earnings": null, + "subtotal": "2819900", + "grand_total": "2763149", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "225239" }, - "invoice_number": null, - "billing_details": { - "payment_terms": { - "interval": "day", - "frequency": 14 + "line_items": [ + { + "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", + "totals": { + "tax": "199687", + "total": "2449687", + "discount": "250000", + "subtotal": "2500000" + }, + "product": { + "id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "name": "AeroEdit Enterprise", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/Ws808ziTS76a6YbnMkiK_enterprise.png", + "created_at": "2023-02-23T12:44:34.923000Z", + "updated_at": "2024-04-05T15:58:28.309000Z", + "custom_data": { + "features": { + "sso": true, + "route_planning": true, + "payment_by_invoice": true, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true + }, + "suggested_addons": [], + "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." + }, + "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "quantity": 50, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "3994", + "total": "48994", + "discount": "5000", + "subtotal": "50000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", + "totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" + }, + "product": { + "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "name": "VIP support", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png", + "created_at": "2023-02-23T13:58:17.615000Z", + "updated_at": "2024-04-05T15:44:02.893000Z", + "custom_data": null, + "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" + }, + "proration": null + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", + "totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" }, - "enable_checkout": false, - "purchase_order_number": "PO-123", - "additional_information": null + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + }, + "proration": null + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "225239", + "total": "2763149", + "discount": "281990", + "subtotal": "2819900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_totals": { + "fee": "0", + "tax": "225239", + "total": "2763149", + "earnings": "0", + "subtotal": "2537910", + "grand_total": "2763149", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "225239" + }, + "adjusted_payout_totals": null + }, + "checkout": { + "url": null + }, + "payments": [], + "billed_at": null, + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T07:40:38.007040Z", + "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", + "updated_at": "2024-04-12T10:00:03.871169Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", + "currency_code": "USD", + "billing_period": { + "ends_at": "2025-04-11T23:59:00.000000Z", + "starts_at": "2024-04-12T00:00:00.000000Z" + }, + "invoice_number": null, + "billing_details": { + "payment_terms": { + "interval": "day", + "frequency": 14 }, - "collection_mode": "manual", - "subscription_id": null -} \ No newline at end of file + "enable_checkout": false, + "purchase_order_number": "PO-123", + "additional_information": null + }, + "collection_mode": "manual", + "subscription_id": null +} diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity.json index 75b08b99..cdb1f949 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity.json @@ -162,7 +162,8 @@ "grand_total": "194341", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "15841" }, "line_items": [ { @@ -245,7 +246,8 @@ "grand_total": "194341", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "15841" }, "line_items": [ { diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity_with_includes.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity_with_includes.json index 9fc9b206..e0fb475a 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity_with_includes.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/full_entity_with_includes.json @@ -52,7 +52,8 @@ "grand_total": "50000", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "8333" }, "line_items": [ { @@ -127,7 +128,7 @@ } ] }, - "adjustments": [ + "adjustments": [ { "transaction_id": "txn_01h8bxpvx398a7zbawb77y0kp5", "items": [ diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/get_payment_method_change_transaction_entity.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/get_payment_method_change_transaction_entity.json index c1055eef..d9c6b119 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/get_payment_method_change_transaction_entity.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/get_payment_method_change_transaction_entity.json @@ -40,7 +40,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "5000", "currency_code": "AUD" @@ -88,7 +90,8 @@ "balance": "0", "grand_total": "0", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "0", @@ -98,7 +101,8 @@ "fee": "0", "earnings": "0", "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -184,15 +188,15 @@ "maximum_recurring_intervals": 5, "usage_limit": 1000, "restrict_to": [ - "pro_01gsz4t5hdjse780zja8vvr7jg", - "pro_01gsz4s0w61y0pp88528f1wvvb" + "pro_01gsz4t5hdjse780zja8vvr7jg", + "pro_01gsz4s0w61y0pp88528f1wvvb" ], "expires_at": "2024-08-18T08:51:07.596Z", "times_used": 0, "created_at": "2023-08-18T08:51:07.596Z", "updated_at": "2023-08-18T08:51:07.596Z", "custom_data": { - "key": "value" + "key": "value" } }, "available_payment_methods": [ diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_charge_full_entity.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_charge_full_entity.json index b0a4f5db..1748be57 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_charge_full_entity.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_charge_full_entity.json @@ -46,7 +46,8 @@ "grand_total": "43549", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "3549" }, "line_items": [ { @@ -202,7 +203,8 @@ "grand_total": "43549", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "3549" }, "line_items": [ { @@ -360,7 +362,8 @@ "grand_total": "21666", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "1766" }, "line_items": [ { diff --git a/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_update_full_entity.json b/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_update_full_entity.json index c4748379..f5392ce0 100644 --- a/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_update_full_entity.json +++ b/tests/Functional/Resources/Subscriptions/_fixtures/response/preview_update_full_entity.json @@ -46,7 +46,8 @@ "grand_total": "194341", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "15841" }, "line_items": [ { @@ -202,7 +203,8 @@ "grand_total": "194341", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "15841" }, "line_items": [ { @@ -386,7 +388,8 @@ "grand_total": "150782", "earnings": null, "currency_code": "USD", - "exchange_rate": "1" + "exchange_rate": "1", + "grand_total_tax": "15840" }, "line_items": [ { diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/full_entity.json b/tests/Functional/Resources/Transactions/_fixtures/response/full_entity.json index c9c154c0..75aab177 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/full_entity.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/full_entity.json @@ -104,7 +104,8 @@ "credit_to_balance": "0", "balance": "2915", "earnings": null, - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "486" }, "adjusted_totals": { "subtotal": "2429", @@ -114,7 +115,8 @@ "fee": "0", "earnings": "0", "currency_code": "GBP", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "486" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -222,15 +224,15 @@ "maximum_recurring_intervals": 5, "usage_limit": 1000, "restrict_to": [ - "pro_01gsz4t5hdjse780zja8vvr7jg", - "pro_01gsz4s0w61y0pp88528f1wvvb" + "pro_01gsz4t5hdjse780zja8vvr7jg", + "pro_01gsz4s0w61y0pp88528f1wvvb" ], "expires_at": "2024-08-18T08:51:07.596Z", "times_used": 0, "created_at": "2023-08-18T08:51:07.596Z", "updated_at": "2023-08-18T08:51:07.596Z", "custom_data": { - "key": "value" + "key": "value" } }, "available_payment_methods": [ diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/full_entity_with_includes.json b/tests/Functional/Resources/Transactions/_fixtures/response/full_entity_with_includes.json index bb67cded..90c72605 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/full_entity_with_includes.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/full_entity_with_includes.json @@ -104,7 +104,8 @@ "credit_to_balance": "0", "balance": "2915", "earnings": null, - "currency_code": "GBP" + "currency_code": "GBP", + "grand_total_tax": "486" }, "adjusted_totals": { "subtotal": "2429", @@ -114,7 +115,8 @@ "fee": "0", "earnings": "0", "currency_code": "GBP", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "486" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -222,7 +224,9 @@ "created_at": "2023-11-07T15:45:28.561Z", "updated_at": "2023-11-07T15:45:28.561Z" }, - "available_payment_methods": ["apple_pay"] + "available_payment_methods": [ + "apple_pay" + ] }, "meta": { "request_id": "f3dd61c8-045a-4975-95c3-a361ff2abcc6" diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/list_default.json b/tests/Functional/Resources/Transactions/_fixtures/response/list_default.json index 66a2d189..522d50f0 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/list_default.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/list_default.json @@ -141,7 +141,8 @@ "credit_to_balance": "0", "balance": "901387", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "73477" }, "adjusted_totals": { "subtotal": "827910", @@ -151,7 +152,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "73477" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -397,7 +399,8 @@ "credit_to_balance": "0", "balance": "72479", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "12579" }, "adjusted_totals": { "subtotal": "59900", @@ -407,7 +410,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "12579" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -653,7 +657,8 @@ "credit_to_balance": "0", "balance": "59900", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "59900", @@ -663,7 +668,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -859,7 +865,8 @@ "credit_to_balance": "0", "balance": "0", "earnings": "37950", - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "40000", @@ -869,7 +876,8 @@ "fee": "2050", "earnings": "37950", "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": { "subtotal": "40000", @@ -884,7 +892,8 @@ "earnings": "37950", "currency_code": "USD", "exchange_rate": "0.70194147", - "fee_rate": "0" + "fee_rate": "0", + "grand_total_tax": "0" }, "adjusted_payout_totals": { "subtotal": "40000", @@ -1089,7 +1098,8 @@ "credit_to_balance": "0", "balance": "5000", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "5000", @@ -1099,7 +1109,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -1247,7 +1258,8 @@ "credit_to_balance": "0", "balance": "43549", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "3549" }, "adjusted_totals": { "subtotal": "40000", @@ -1257,7 +1269,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "3549" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_one.json b/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_one.json index c9e754e7..07bc1df9 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_one.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_one.json @@ -98,7 +98,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "40000", "currency_code": "AUD" @@ -139,7 +141,8 @@ "credit_to_balance": "0", "balance": "901387", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "73477" }, "adjusted_totals": { "subtotal": "827910", @@ -149,7 +152,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "73477" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -283,7 +287,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "5000", "currency_code": "AUD" @@ -317,7 +323,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "20000", "currency_code": "AUD" @@ -348,7 +356,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "40000", "currency_code": "AUD" @@ -389,7 +399,8 @@ "credit_to_balance": "0", "balance": "72479", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "12579" }, "adjusted_totals": { "subtotal": "59900", @@ -399,7 +410,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "12579" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -533,7 +545,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "5000", "currency_code": "AUD" @@ -567,7 +581,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "20000", "currency_code": "AUD" @@ -598,7 +614,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "40000", "currency_code": "AUD" @@ -639,7 +657,8 @@ "credit_to_balance": "0", "balance": "59900", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "59900", @@ -649,7 +668,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -845,7 +865,8 @@ "credit_to_balance": "0", "balance": "0", "earnings": "37950", - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "40000", @@ -855,7 +876,8 @@ "fee": "2050", "earnings": "37950", "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": { "subtotal": "40000", @@ -870,7 +892,8 @@ "earnings": "37950", "currency_code": "USD", "exchange_rate": "0.70194147", - "fee_rate": "0" + "fee_rate": "0", + "grand_total_tax": "0" }, "adjusted_payout_totals": { "subtotal": "40000", @@ -882,7 +905,7 @@ "original": null }, "earnings": "37950", - "currency_code": "USD", + "currency_code": "USD", "exchange_rate": "0.70194147", "retained_fee": "0" }, @@ -1054,7 +1077,8 @@ "credit_to_balance": "0", "balance": "5000", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "5000", @@ -1064,7 +1088,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -1212,7 +1237,8 @@ "credit_to_balance": "0", "balance": "43549", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "3549" }, "adjusted_totals": { "subtotal": "40000", @@ -1222,7 +1248,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "3549" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_two.json b/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_two.json index 2984dea1..4af1d483 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_two.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/list_paginated_page_two.json @@ -98,7 +98,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "40000", "currency_code": "AUD" @@ -139,7 +141,8 @@ "credit_to_balance": "0", "balance": "901387", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "73477" }, "adjusted_totals": { "subtotal": "827910", @@ -149,7 +152,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "73477" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -283,7 +287,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "5000", "currency_code": "AUD" @@ -317,7 +323,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "20000", "currency_code": "AUD" @@ -348,7 +356,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "40000", "currency_code": "AUD" @@ -389,7 +399,8 @@ "credit_to_balance": "0", "balance": "72479", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "12579" }, "adjusted_totals": { "subtotal": "59900", @@ -399,7 +410,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "12579" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -533,7 +545,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "5000", "currency_code": "AUD" @@ -567,7 +581,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "20000", "currency_code": "AUD" @@ -598,7 +614,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "40000", "currency_code": "AUD" @@ -639,7 +657,8 @@ "credit_to_balance": "0", "balance": "59900", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "59900", @@ -649,7 +668,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -845,7 +865,8 @@ "credit_to_balance": "0", "balance": "0", "earnings": "37950", - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "40000", @@ -855,7 +876,8 @@ "fee": "2050", "earnings": "37950", "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": { "subtotal": "40000", @@ -870,7 +892,8 @@ "earnings": "37950", "currency_code": "USD", "exchange_rate": "0.70194147", - "fee_rate": "0" + "fee_rate": "0", + "grand_total_tax": "0" }, "adjusted_payout_totals": { "subtotal": "40000", @@ -1054,7 +1077,8 @@ "credit_to_balance": "0", "balance": "5000", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "5000", @@ -1064,7 +1088,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": null, "adjusted_payout_totals": null, @@ -1212,7 +1237,8 @@ "credit_to_balance": "0", "balance": "43549", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "3549" }, "adjusted_totals": { "subtotal": "40000", @@ -1222,7 +1248,8 @@ "fee": null, "earnings": null, "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "3549" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/minimal_entity.json b/tests/Functional/Resources/Transactions/_fixtures/response/minimal_entity.json index dd289765..dcdac43c 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/minimal_entity.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/minimal_entity.json @@ -72,7 +72,8 @@ "credit_to_balance": "0", "balance": "0", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "adjusted_totals": { "subtotal": "0", @@ -82,7 +83,8 @@ "fee": "0", "earnings": "0", "currency_code": "USD", - "retained_fee": "0" + "retained_fee": "0", + "grand_total_tax": "0" }, "payout_totals": null, "adjusted_payout_totals": null, diff --git a/tests/Functional/Resources/Transactions/_fixtures/response/preview_entity.json b/tests/Functional/Resources/Transactions/_fixtures/response/preview_entity.json index 8af29dca..ff37d205 100644 --- a/tests/Functional/Resources/Transactions/_fixtures/response/preview_entity.json +++ b/tests/Functional/Resources/Transactions/_fixtures/response/preview_entity.json @@ -56,7 +56,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "40000", "currency_code": "AUD" @@ -91,7 +93,9 @@ }, "unit_price_overrides": [ { - "country_codes": ["AU"], + "country_codes": [ + "AU" + ], "unit_price": { "amount": "40000", "currency_code": "AUD" @@ -135,7 +139,8 @@ "credit_to_balance": "0", "balance": "540000", "earnings": null, - "currency_code": "USD" + "currency_code": "USD", + "grand_total_tax": "0" }, "line_items": [ { @@ -169,7 +174,9 @@ ] }, "ignore_trials": false, - "available_payment_methods": ["apple_pay"] + "available_payment_methods": [ + "apple_pay" + ] }, "meta": { "request_id": "9e6a1195-d86f-4110-a0ee-981b5500a6a8" diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.billed.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.billed.json index 0cd9d0f3..1e55aea9 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.billed.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.billed.json @@ -1,275 +1,277 @@ { - "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", - "items": [ - { - "price": { - "id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "name": "Annual (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:57:54.249913Z", - "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "unit_price": { - "amount": "50000", - "currency_code": "USD" - }, - "updated_at": "2024-04-05T14:32:00.471447Z", - "custom_data": null, - "description": "Annual", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 50, - "proration": null + "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", + "items": [ + { + "price": { + "id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "name": "Annual (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - { - "price": { - "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "name": "Annual (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:00:40.265185Z", - "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "unit_price": { - "amount": "300000", - "currency_code": "USD" - }, - "updated_at": "2024-03-25T14:31:18.587603Z", - "custom_data": null, - "description": "Annual (recurring addon)", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:57:54.249913Z", + "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "unit_price": { + "amount": "50000", + "currency_code": "USD" + }, + "updated_at": "2024-04-05T14:32:00.471447Z", + "custom_data": null, + "description": "Annual", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 50, + "proration": null + }, + { + "price": { + "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "name": "Annual (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:00:40.265185Z", + "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "unit_price": { + "amount": "300000", + "currency_code": "USD" + }, + "updated_at": "2024-03-25T14:31:18.587603Z", + "custom_data": null, + "description": "Annual (recurring addon)", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "api", + "status": "billed", + "details": { + "totals": { + "fee": null, + "tax": "225239", + "total": "2763149", + "credit": "0", + "balance": "2763149", + "discount": "281990", + "earnings": null, + "subtotal": "2819900", + "grand_total": "2763149", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "225239" + }, + "line_items": [ + { + "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", + "totals": { + "tax": "199687", + "total": "2449687", + "discount": "250000", + "subtotal": "2500000" + }, + "product": { + "id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "name": "AeroEdit Enterprise", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/Ws808ziTS76a6YbnMkiK_enterprise.png", + "created_at": "2023-02-23T12:44:34.923000Z", + "updated_at": "2024-04-05T15:58:28.309000Z", + "custom_data": { + "features": { + "sso": true, + "route_planning": true, + "payment_by_invoice": true, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "quantity": 1, - "proration": null + "suggested_addons": [], + "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." + }, + "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "quantity": 50, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "3994", + "total": "48994", + "discount": "5000", + "subtotal": "50000" } - ], - "origin": "api", - "status": "billed", - "details": { + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", "totals": { - "fee": null, - "tax": "225239", - "total": "2763149", - "credit": "0", - "balance": "2763149", - "discount": "281990", - "earnings": null, - "subtotal": "2819900", - "grand_total": "2763149", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" }, - "line_items": [ - { - "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", - "totals": { - "tax": "199687", - "total": "2449687", - "discount": "250000", - "subtotal": "2500000" - }, - "product": { - "id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "name": "AeroEdit Enterprise", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/Ws808ziTS76a6YbnMkiK_enterprise.png", - "created_at": "2023-02-23T12:44:34.923000Z", - "updated_at": "2024-04-05T15:58:28.309000Z", - "custom_data": { - "features": { - "sso": true, - "route_planning": true, - "payment_by_invoice": true, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [], - "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." - }, - "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "quantity": 50, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "3994", - "total": "48994", - "discount": "5000", - "subtotal": "50000" - } - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", - "totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "product": { - "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "name": "VIP support", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/qgyipKJwRtq98YNboipo_vip-support.png", - "created_at": "2023-02-23T13:58:17.615000Z", - "updated_at": "2024-04-05T15:44:02.893000Z", - "custom_data": null, - "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - } - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", - "totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "225239", - "total": "2763149", - "discount": "281990", - "subtotal": "2819900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "0", - "tax": "225239", - "total": "2763149", - "earnings": "0", - "subtotal": "2537910", - "grand_total": "2763149", - "currency_code": "USD", - "retained_fee": "0" + "product": { + "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "name": "VIP support", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png", + "created_at": "2023-02-23T13:58:17.615000Z", + "updated_at": "2024-04-05T15:44:02.893000Z", + "custom_data": null, + "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" } - }, - "checkout": { - "url": null - }, - "payments": [], - "billed_at": "2024-04-12T10:30:27.198043Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T07:40:38.007040Z", - "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", - "updated_at": "2024-04-12T10:30:27.584874Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", - "currency_code": "USD", - "billing_period": { - "ends_at": "2025-04-11T23:59:00.000000Z", - "starts_at": "2024-04-12T00:00:00.000000Z" - }, - "invoice_number": null, - "billing_details": { - "payment_terms": { - "interval": "day", - "frequency": 14 + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", + "totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null }, - "enable_checkout": false, - "purchase_order_number": "PO-123", - "additional_information": null + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + } + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "225239", + "total": "2763149", + "discount": "281990", + "subtotal": "2819900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "0", + "tax": "225239", + "total": "2763149", + "earnings": "0", + "subtotal": "2537910", + "grand_total": "2763149", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "225239" + } + }, + "checkout": { + "url": null + }, + "payments": [], + "billed_at": "2024-04-12T10:30:27.198043Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T07:40:38.007040Z", + "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", + "updated_at": "2024-04-12T10:30:27.584874Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", + "currency_code": "USD", + "billing_period": { + "ends_at": "2025-04-11T23:59:00.000000Z", + "starts_at": "2024-04-12T00:00:00.000000Z" + }, + "invoice_number": null, + "billing_details": { + "payment_terms": { + "interval": "day", + "frequency": 14 }, - "collection_mode": "manual", - "subscription_id": null -} \ No newline at end of file + "enable_checkout": false, + "purchase_order_number": "PO-123", + "additional_information": null + }, + "collection_mode": "manual", + "subscription_id": null +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.canceled.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.canceled.json index be97ead0..990eaf6d 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.canceled.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.canceled.json @@ -1,275 +1,277 @@ { - "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", - "items": [ - { - "price": { - "id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "name": "Annual (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:57:54.249913Z", - "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "unit_price": { - "amount": "50000", - "currency_code": "USD" - }, - "updated_at": "2024-04-05T14:32:00.471447Z", - "custom_data": null, - "description": "Annual", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 50, - "proration": null + "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", + "items": [ + { + "price": { + "id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "name": "Annual (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - { - "price": { - "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "name": "Annual (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:00:40.265185Z", - "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "unit_price": { - "amount": "300000", - "currency_code": "USD" - }, - "updated_at": "2024-03-25T14:31:18.587603Z", - "custom_data": null, - "description": "Annual (recurring addon)", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:57:54.249913Z", + "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "unit_price": { + "amount": "50000", + "currency_code": "USD" + }, + "updated_at": "2024-04-05T14:32:00.471447Z", + "custom_data": null, + "description": "Annual", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 50, + "proration": null + }, + { + "price": { + "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "name": "Annual (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:00:40.265185Z", + "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "unit_price": { + "amount": "300000", + "currency_code": "USD" + }, + "updated_at": "2024-03-25T14:31:18.587603Z", + "custom_data": null, + "description": "Annual (recurring addon)", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "api", + "status": "canceled", + "details": { + "totals": { + "fee": null, + "tax": "225239", + "total": "2763149", + "credit": "0", + "balance": "2763149", + "discount": "281990", + "earnings": null, + "subtotal": "2819900", + "grand_total": "2763149", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "225239" + }, + "line_items": [ + { + "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", + "totals": { + "tax": "199687", + "total": "2449687", + "discount": "250000", + "subtotal": "2500000" + }, + "product": { + "id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "name": "AeroEdit Enterprise", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/Ws808ziTS76a6YbnMkiK_enterprise.png", + "created_at": "2023-02-23T12:44:34.923000Z", + "updated_at": "2024-04-05T15:58:28.309000Z", + "custom_data": { + "features": { + "sso": true, + "route_planning": true, + "payment_by_invoice": true, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "quantity": 1, - "proration": null + "suggested_addons": [], + "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." + }, + "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "quantity": 50, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "3994", + "total": "48994", + "discount": "5000", + "subtotal": "50000" } - ], - "origin": "api", - "status": "canceled", - "details": { + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", "totals": { - "fee": null, - "tax": "225239", - "total": "2763149", - "credit": "0", - "balance": "2763149", - "discount": "281990", - "earnings": null, - "subtotal": "2819900", - "grand_total": "2763149", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" }, - "line_items": [ - { - "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", - "totals": { - "tax": "199687", - "total": "2449687", - "discount": "250000", - "subtotal": "2500000" - }, - "product": { - "id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "name": "AeroEdit Enterprise", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/Ws808ziTS76a6YbnMkiK_enterprise.png", - "created_at": "2023-02-23T12:44:34.923000Z", - "updated_at": "2024-04-05T15:58:28.309000Z", - "custom_data": { - "features": { - "sso": true, - "route_planning": true, - "payment_by_invoice": true, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [], - "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." - }, - "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "quantity": 50, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "3994", - "total": "48994", - "discount": "5000", - "subtotal": "50000" - } - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", - "totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "product": { - "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "name": "VIP support", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/qgyipKJwRtq98YNboipo_vip-support.png", - "created_at": "2023-02-23T13:58:17.615000Z", - "updated_at": "2024-04-05T15:44:02.893000Z", - "custom_data": null, - "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - } - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", - "totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "225239", - "total": "2763149", - "discount": "281990", - "subtotal": "2819900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "0", - "tax": "225239", - "total": "2763149", - "earnings": "0", - "subtotal": "2537910", - "grand_total": "2763149", - "currency_code": "USD", - "retained_fee": "0" + "product": { + "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "name": "VIP support", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png", + "created_at": "2023-02-23T13:58:17.615000Z", + "updated_at": "2024-04-05T15:44:02.893000Z", + "custom_data": null, + "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" } - }, - "checkout": { - "url": null - }, - "payments": [], - "billed_at": "2024-04-12T10:30:27.198043Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T07:40:38.007040Z", - "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", - "updated_at": "2024-04-12T10:31:27.360716Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", - "currency_code": "USD", - "billing_period": { - "ends_at": "2025-04-11T23:59:00.000000Z", - "starts_at": "2024-04-12T00:00:00.000000Z" - }, - "invoice_number": "325-10567", - "billing_details": { - "payment_terms": { - "interval": "day", - "frequency": 14 + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", + "totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null }, - "enable_checkout": false, - "purchase_order_number": "PO-123", - "additional_information": null + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + } + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "225239", + "total": "2763149", + "discount": "281990", + "subtotal": "2819900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "0", + "tax": "225239", + "total": "2763149", + "earnings": "0", + "subtotal": "2537910", + "grand_total": "2763149", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "225239" + } + }, + "checkout": { + "url": null + }, + "payments": [], + "billed_at": "2024-04-12T10:30:27.198043Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T07:40:38.007040Z", + "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", + "updated_at": "2024-04-12T10:31:27.360716Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", + "currency_code": "USD", + "billing_period": { + "ends_at": "2025-04-11T23:59:00.000000Z", + "starts_at": "2024-04-12T00:00:00.000000Z" + }, + "invoice_number": "325-10567", + "billing_details": { + "payment_terms": { + "interval": "day", + "frequency": 14 }, - "collection_mode": "manual", - "subscription_id": "sub_01hv8xqmay5w5rfsnzkxzgy0yp" -} \ No newline at end of file + "enable_checkout": false, + "purchase_order_number": "PO-123", + "additional_information": null + }, + "collection_mode": "manual", + "subscription_id": "sub_01hv8xqmay5w5rfsnzkxzgy0yp" +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.completed.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.completed.json index 2c69caad..eaaad968 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.completed.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.completed.json @@ -1,329 +1,332 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" + }, + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "completed", + "details": { + "totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" + }, + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "quantity": 1, - "proration": null + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" } - ], - "origin": "web", - "status": "completed", - "details": { + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", "totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - } - } - ], - "payout_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0", - "exchange_rate": "0.70194147", - "fee_rate": "0" + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null }, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" } - }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" - }, - "payments": [ - { - "amount": "65215", - "status": "captured", - "created_at": "2024-04-12T10:18:33.579142Z", - "error_code": null, - "captured_at": "2024-04-12T10:18:47.635628Z", - "method_details": { - "card": { - "type": "visa", - "last4": "3184", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", - "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", - "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" }, - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "0002", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" } + } ], - "billed_at": "2024-04-12T10:18:48.294633Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx", - "updated_at": "2024-04-12T10:18:49.738971Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": { - "ends_at": "2024-05-12T10:18:47.635628Z", - "starts_at": "2024-04-12T10:18:47.635628Z" + "payout_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "exchange_rate": "0.70194147", + "fee_rate": "0", + "grand_total_tax": "5315" }, - "invoice_number": "325-10566", - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" -} \ No newline at end of file + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" + } + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [ + { + "amount": "65215", + "status": "captured", + "created_at": "2024-04-12T10:18:33.579142Z", + "error_code": null, + "captured_at": "2024-04-12T10:18:47.635628Z", + "method_details": { + "card": { + "type": "visa", + "last4": "3184", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", + "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", + "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + }, + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "0002", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + } + ], + "billed_at": "2024-04-12T10:18:48.294633Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx", + "updated_at": "2024-04-12T10:18:49.738971Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": { + "ends_at": "2024-05-12T10:18:47.635628Z", + "starts_at": "2024-04-12T10:18:47.635628Z" + }, + "invoice_number": "325-10566", + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.created.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.created.json index fce9056d..e339c213 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.created.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.created.json @@ -1,267 +1,269 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" + }, + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "draft", + "details": { + "totals": { + "fee": null, + "tax": "9585", + "total": "57509", + "credit": "0", + "balance": "57509", + "discount": "0", + "earnings": null, + "subtotal": "47924", + "grand_total": "57509", + "currency_code": "GBP", + "credit_to_balance": "0", + "grand_total_tax": "9585" + }, + "line_items": [ + { + "id": "txnitm_01hv8wpts6n6wkcr973fmt6gt7", + "totals": { + "tax": "4800", + "total": "28800", + "discount": "0", + "subtotal": "24000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "quantity": 1, - "proration": null + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "proration": null, + "tax_rate": "0.2", + "unit_totals": { + "tax": "480", + "total": "2880", + "discount": "0", + "subtotal": "2400" } - ], - "origin": "web", - "status": "draft", - "details": { + }, + { + "id": "txnitm_01hv8wpts6n6wkcr973jywgjzx", "totals": { - "fee": null, - "tax": "9585", - "total": "57509", - "credit": "0", - "balance": "57509", - "discount": "0", - "earnings": null, - "subtotal": "47924", - "grand_total": "57509", - "currency_code": "GBP", - "credit_to_balance": "0" + "tax": "1600", + "total": "9601", + "discount": "0", + "subtotal": "8001" }, - "line_items": [ - { - "id": "txnitm_01hv8wpts6n6wkcr973fmt6gt7", - "totals": { - "tax": "4800", - "total": "28800", - "discount": "0", - "subtotal": "24000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "proration": null, - "tax_rate": "0.2", - "unit_totals": { - "tax": "480", - "total": "2880", - "discount": "0", - "subtotal": "2400" - } - }, - { - "id": "txnitm_01hv8wpts6n6wkcr973jywgjzx", - "totals": { - "tax": "1600", - "total": "9601", - "discount": "0", - "subtotal": "8001" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "proration": null, - "tax_rate": "0.2", - "unit_totals": { - "tax": "1600", - "total": "9601", - "discount": "0", - "subtotal": "8001" - } - }, - { - "id": "txnitm_01hv8wpts6n6wkcr973nc9r7dm", - "totals": { - "tax": "3185", - "total": "19108", - "discount": "0", - "subtotal": "15923" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.2", - "unit_totals": { - "tax": "3185", - "total": "19108", - "discount": "0", - "subtotal": "15923" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "9585", - "total": "57509", - "discount": "0", - "subtotal": "47924" - }, - "tax_rate": "0.2" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "0", - "tax": "9585", - "total": "57509", - "earnings": "0", - "subtotal": "47924", - "grand_total": "57509", - "currency_code": "GBP", - "retained_fee": "0" + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "proration": null, + "tax_rate": "0.2", + "unit_totals": { + "tax": "1600", + "total": "9601", + "discount": "0", + "subtotal": "8001" } - }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" - }, - "payments": [], - "billed_at": null, - "address_id": null, - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:12:33.201400Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": null, - "discount_id": null, - "currency_code": "GBP", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null -} \ No newline at end of file + }, + { + "id": "txnitm_01hv8wpts6n6wkcr973nc9r7dm", + "totals": { + "tax": "3185", + "total": "19108", + "discount": "0", + "subtotal": "15923" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.2", + "unit_totals": { + "tax": "3185", + "total": "19108", + "discount": "0", + "subtotal": "15923" + } + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "9585", + "total": "57509", + "discount": "0", + "subtotal": "47924" + }, + "tax_rate": "0.2" + } + ], + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "0", + "tax": "9585", + "total": "57509", + "earnings": "0", + "subtotal": "47924", + "grand_total": "57509", + "currency_code": "GBP", + "retained_fee": "0", + "grand_total_tax": "9585" + } + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [], + "billed_at": null, + "address_id": null, + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:12:33.201400Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": null, + "discount_id": null, + "currency_code": "GBP", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.paid.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.paid.json index e0fb0b33..4bd5d335 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.paid.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.paid.json @@ -1,351 +1,353 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null - } - ], - "origin": "web", - "status": "paid", - "details": { - "totals": { - "fee": null, - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": null, - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "0", - "tax": "5315", - "total": "65215", - "earnings": "0", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" - } + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null }, - "payments": [ - { - "amount": "65215", - "status": "captured", - "created_at": "2024-04-12T10:18:33.579142Z", - "error_code": null, - "captured_at": "2024-04-12T10:18:47.635628Z", - "method_details": { - "card": { - "type": "visa", - "last4": "3184", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", - "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", - "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 }, - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "0002", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" }, - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": null, - "type": "korea_local", - "south_korea_local_card": null, - "underlying_details": { - "korea_local": { - "type": "kdbbank" - } - } - }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "paid", + "details": { + "totals": { + "fee": null, + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": null, + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" + }, + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" }, - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:18:40.000000Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": null, - "type": "south_korea_local_card", - "south_korea_local_card": { - "type": "kakaobank", - "last4": "4242" - }, - "underlying_details": null + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne8a", - "payment_attempt_id": "9a82cfa6-26b4-4a57-91dc-8f2708f7822e", - "stored_payment_method_id": "b78ece50-356f-4e0c-b72d-ad5368b0a0d8" + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" } + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + } + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + } + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } ], - "billed_at": "2024-04-12T10:18:48.294633Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:18:48.294635Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null -} \ No newline at end of file + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "0", + "tax": "5315", + "total": "65215", + "earnings": "0", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" + } + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [ + { + "amount": "65215", + "status": "captured", + "created_at": "2024-04-12T10:18:33.579142Z", + "error_code": null, + "captured_at": "2024-04-12T10:18:47.635628Z", + "method_details": { + "card": { + "type": "visa", + "last4": "3184", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", + "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", + "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + }, + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "0002", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + }, + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": null, + "type": "korea_local", + "south_korea_local_card": null, + "underlying_details": { + "korea_local": { + "type": "kdbbank" + } + } + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + }, + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:18:40.000000Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": null, + "type": "south_korea_local_card", + "south_korea_local_card": { + "type": "kakaobank", + "last4": "4242" + }, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne8a", + "payment_attempt_id": "9a82cfa6-26b4-4a57-91dc-8f2708f7822e", + "stored_payment_method_id": "b78ece50-356f-4e0c-b72d-ad5368b0a0d8" + } + ], + "billed_at": "2024-04-12T10:18:48.294633Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:18:48.294635Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.past_due.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.past_due.json index a4854b58..be2b13b9 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.past_due.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.past_due.json @@ -1,257 +1,259 @@ { - "id": "txn_01hv8xbtmb6zc7c264ycteehth", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": { - "rate": "1", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - } - } + "id": "txn_01hv8xbtmb6zc7c264ycteehth", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": { - "rate": "1", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - } - } - } - ], - "origin": "subscription_recurring", - "status": "past_due", - "details": { - "totals": { - "fee": null, - "tax": "3549", - "total": "43549", - "credit": "0", - "balance": "43549", - "discount": "0", - "earnings": null, - "subtotal": "40000", - "grand_total": "43549", - "currency_code": "USD", - "credit_to_balance": "0" + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" }, - "line_items": [ - { - "id": "txnitm_01hv8xbv0wdggp4a9338b18ckn", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "tax_rate": "0.08875", - "proration": { - "rate": "1", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - } - }, - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01hv8xbv0wdggp4a933cx2m9qc", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "tax_rate": "0.08875", - "proration": { - "rate": "1", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - } - }, - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "3549", - "total": "43549", - "discount": "0", - "subtotal": "40000" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "0", - "tax": "3549", - "total": "43549", - "earnings": "0", - "subtotal": "40000", - "grand_total": "43549", - "currency_code": "USD", - "retained_fee": "0" + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": { + "rate": "1", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" } + } }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8xbtmb6zc7c264ycteehth" + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": { + "rate": "1", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + } + } + } + ], + "origin": "subscription_recurring", + "status": "past_due", + "details": { + "totals": { + "fee": null, + "tax": "3549", + "total": "43549", + "credit": "0", + "balance": "43549", + "discount": "0", + "earnings": null, + "subtotal": "40000", + "grand_total": "43549", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "3549" }, - "payments": [ - { - "amount": "43549", - "status": "error", - "created_at": "2024-04-12T10:24:01.692772Z", - "error_code": "authentication_failed", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "3184", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null + "line_items": [ + { + "id": "txnitm_01hv8xbv0wdggp4a9338b18ckn", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", - "payment_attempt_id": "ff8123f6-9cfc-4f04-9984-75e4ad04b169", - "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "tax_rate": "0.08875", + "proration": { + "rate": "1", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + } + }, + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" + } + }, + { + "id": "txnitm_01hv8xbv0wdggp4a933cx2m9qc", + "totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + }, + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "tax_rate": "0.08875", + "proration": { + "rate": "1", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + } + }, + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" } + } ], - "billed_at": "2024-04-12T10:24:01.163479Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:24:01.588479Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:24:03.197001Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": { - "ends_at": "2024-06-12T10:18:47.635628Z", - "starts_at": "2024-05-12T10:18:47.635628Z" - }, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" -} \ No newline at end of file + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "3549", + "total": "43549", + "discount": "0", + "subtotal": "40000" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "0", + "tax": "3549", + "total": "43549", + "earnings": "0", + "subtotal": "40000", + "grand_total": "43549", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "3549" + } + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8xbtmb6zc7c264ycteehth" + }, + "payments": [ + { + "amount": "43549", + "status": "error", + "created_at": "2024-04-12T10:24:01.692772Z", + "error_code": "authentication_failed", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "3184", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", + "payment_attempt_id": "ff8123f6-9cfc-4f04-9984-75e4ad04b169", + "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + } + ], + "billed_at": "2024-04-12T10:24:01.163479Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:24:01.588479Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:24:03.197001Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": { + "ends_at": "2024-06-12T10:18:47.635628Z", + "starts_at": "2024-05-12T10:18:47.635628Z" + }, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.payment_failed.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.payment_failed.json index 404ac4bf..583956e4 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.payment_failed.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.payment_failed.json @@ -1,290 +1,292 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" + }, + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "ready", + "details": { + "totals": { + "fee": null, + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "65215", + "discount": "0", + "earnings": null, + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" + }, + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "quantity": 1, - "proration": null + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" } - ], - "origin": "web", - "status": "ready", - "details": { + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", "totals": { - "fee": null, - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "65215", - "discount": "0", - "earnings": null, - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "0", - "tax": "5315", - "total": "65215", - "earnings": "0", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" } - }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" - }, - "payments": [ - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "0002", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" } + } ], - "billed_at": null, - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:14:26.325076Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null -} \ No newline at end of file + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "0", + "tax": "5315", + "total": "65215", + "earnings": "0", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" + } + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [ + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "0002", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + } + ], + "billed_at": null, + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:14:26.325076Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.ready.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.ready.json index 353e1c9e..9d9da444 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.ready.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.ready.json @@ -1,267 +1,269 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" + }, + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "ready", + "details": { + "totals": { + "fee": null, + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "65215", + "discount": "0", + "earnings": null, + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" + }, + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "quantity": 1, - "proration": null + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" } - ], - "origin": "web", - "status": "ready", - "details": { + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", "totals": { - "fee": null, - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "65215", - "discount": "0", - "earnings": null, - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "0", - "tax": "5315", - "total": "65215", - "earnings": "0", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" } - }, - "checkout": { - "url": "https:\/\/aeroedit.com\/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" - }, - "payments": [], - "billed_at": null, - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": null, - "updated_at": "2024-04-12T10:14:26.325076Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": null, - "invoice_number": null, - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": null -} \ No newline at end of file + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + } + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "0", + "tax": "5315", + "total": "65215", + "earnings": "0", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" + } + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [], + "billed_at": null, + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": null, + "updated_at": "2024-04-12T10:14:26.325076Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": null, + "invoice_number": null, + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": null +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.revised.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.revised.json index d9a7f61d..bcdccd22 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.revised.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.revised.json @@ -1,342 +1,345 @@ { - "id": "txn_01hv8wptq8987qeep44cyrewp9", - "items": [ - { - "price": { - "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "name": "Monthly (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 999, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:55:22.538367Z", - "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "unit_price": { - "amount": "3000", - "currency_code": "USD" - }, - "updated_at": "2024-04-11T13:54:52.254748Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 10, - "proration": null + "id": "txn_01hv8wptq8987qeep44cyrewp9", + "items": [ + { + "price": { + "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "name": "Monthly (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 999, + "minimum": 1 }, - { - "price": { - "id": "pri_01h1vjfevh5etwq3rb416a23h2", - "name": "Monthly (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-06-01T13:31:12.625056Z", - "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "unit_price": { - "amount": "10000", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:00.907834Z", - "custom_data": null, - "description": "Monthly", - "trial_period": null, - "billing_cycle": { - "interval": "month", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:55:22.538367Z", + "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "unit_price": { + "amount": "3000", + "currency_code": "USD" + }, + "updated_at": "2024-04-11T13:54:52.254748Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 10, + "proration": null + }, + { + "price": { + "id": "pri_01h1vjfevh5etwq3rb416a23h2", + "name": "Monthly (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-06-01T13:31:12.625056Z", + "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "unit_price": { + "amount": "10000", + "currency_code": "USD" }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null + "updated_at": "2024-04-09T07:23:00.907834Z", + "custom_data": null, + "description": "Monthly", + "trial_period": null, + "billing_cycle": { + "interval": "month", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "web", + "status": "completed", + "details": { + "totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "5315" + }, + "line_items": [ + { + "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", + "totals": { + "tax": "2662", + "total": "32662", + "discount": "0", + "subtotal": "30000" + }, + "product": { + "id": "pro_01gsz4t5hdjse780zja8vvr7jg", + "name": "AeroEdit Pro", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", + "created_at": "2023-02-23T12:43:46.605000Z", + "updated_at": "2024-04-05T15:53:44.687000Z", + "custom_data": { + "features": { + "sso": false, + "route_planning": true, + "payment_by_invoice": false, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "quantity": 1, - "proration": null + "suggested_addons": [ + "pro_01h1vjes1y163xfj1rh1tkfb65", + "pro_01gsz97mq9pa4fkyy0wqenepkz" + ], + "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." + }, + "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", + "quantity": 10, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "266", + "total": "3266", + "discount": "0", + "subtotal": "3000" } - ], - "origin": "web", - "status": "completed", - "details": { + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", "totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" }, - "line_items": [ - { - "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n", - "totals": { - "tax": "2662", - "total": "32662", - "discount": "0", - "subtotal": "30000" - }, - "product": { - "id": "pro_01gsz4t5hdjse780zja8vvr7jg", - "name": "AeroEdit Pro", - "type": "standard", - "status": "active", - "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png", - "created_at": "2023-02-23T12:43:46.605000Z", - "updated_at": "2024-04-05T15:53:44.687000Z", - "custom_data": { - "features": { - "sso": false, - "route_planning": true, - "payment_by_invoice": false, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [ - "pro_01h1vjes1y163xfj1rh1tkfb65", - "pro_01gsz97mq9pa4fkyy0wqenepkz" - ], - "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring." - }, - "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke", - "quantity": 10, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "266", - "total": "3266", - "discount": "0", - "subtotal": "3000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y", - "totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - }, - "product": { - "id": "pro_01h1vjes1y163xfj1rh1tkfb65", - "name": "Analytics addon", - "type": "standard", - "status": "active", - "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", - "created_at": "2023-06-01T13:30:50.302000Z", - "updated_at": "2024-04-05T15:47:17.163000Z", - "custom_data": null, - "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "887", - "total": "10887", - "discount": "0", - "subtotal": "10000" - } - }, - { - "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", - "totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1766", - "total": "21666", - "discount": "0", - "subtotal": "19900" - } - } - ], - "payout_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "credit": "0", - "balance": "0", - "discount": "0", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "credit_to_balance": "0", - "exchange_rate": "0.70194147", - "fee_rate": "0" + "product": { + "id": "pro_01h1vjes1y163xfj1rh1tkfb65", + "name": "Analytics addon", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png", + "created_at": "2023-06-01T13:30:50.302000Z", + "updated_at": "2024-04-05T15:47:17.163000Z", + "custom_data": null, + "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.", + "tax_category": "standard", + "import_meta": null }, - "tax_rates_used": [ - { - "totals": { - "tax": "5315", - "total": "65215", - "discount": "0", - "subtotal": "59900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "chargeback_fee": { - "amount": "0", - "original": null - }, - "earnings": "56589", - "subtotal": "59900", - "currency_code": "USD", - "exchange_rate": "0.70194147", - "retained_fee": "0" + "price_id": "pri_01h1vjfevh5etwq3rb416a23h2", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "887", + "total": "10887", + "discount": "0", + "subtotal": "10000" + } + }, + { + "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6", + "totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null }, - "adjusted_totals": { - "fee": "3311", - "tax": "5315", - "total": "65215", - "earnings": "56589", - "subtotal": "59900", - "grand_total": "65215", - "currency_code": "USD", - "retained_fee": "0" + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1766", + "total": "21666", + "discount": "0", + "subtotal": "19900" } + } + ], + "payout_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "credit": "0", + "balance": "0", + "discount": "0", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "credit_to_balance": "0", + "exchange_rate": "0.70194147", + "fee_rate": "0", + "grand_total_tax": "5315" }, - "checkout": { - "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" - }, - "payments": [ - { - "amount": "65215", - "status": "captured", - "created_at": "2024-04-12T10:18:33.579142Z", - "error_code": null, - "captured_at": "2024-04-12T10:18:47.635628Z", - "method_details": { - "card": { - "type": "visa", - "last4": "3184", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", - "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", - "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + "tax_rates_used": [ + { + "totals": { + "tax": "5315", + "total": "65215", + "discount": "0", + "subtotal": "59900" }, - { - "amount": "65215", - "status": "error", - "created_at": "2024-04-12T10:15:57.888183Z", - "error_code": "declined", - "captured_at": null, - "method_details": { - "card": { - "type": "visa", - "last4": "0002", - "expiry_year": 2025, - "expiry_month": 1, - "cardholder_name": "Michael McGovern" - }, - "type": "card", - "south_korea_local_card": null, - "underlying_details": null - }, - "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", - "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", - "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" - } + "tax_rate": "0.08875" + } ], - "billed_at": "2024-04-12T10:18:48.294633Z", - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T10:12:33.201400Z", - "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx", - "updated_at": "2024-04-12T10:18:49.738971Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": null, - "currency_code": "USD", - "billing_period": { - "ends_at": "2024-05-12T10:18:47.635628Z", - "starts_at": "2024-04-12T10:18:47.635628Z" + "adjusted_payout_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "chargeback_fee": { + "amount": "0", + "original": null + }, + "earnings": "56589", + "subtotal": "59900", + "currency_code": "USD", + "exchange_rate": "0.70194147", + "retained_fee": "0" }, - "invoice_number": "325-10566", - "billing_details": null, - "collection_mode": "automatic", - "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" -} \ No newline at end of file + "adjusted_totals": { + "fee": "3311", + "tax": "5315", + "total": "65215", + "earnings": "56589", + "subtotal": "59900", + "grand_total": "65215", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "5315" + } + }, + "checkout": { + "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9" + }, + "payments": [ + { + "amount": "65215", + "status": "captured", + "created_at": "2024-04-12T10:18:33.579142Z", + "error_code": null, + "captured_at": "2024-04-12T10:18:47.635628Z", + "method_details": { + "card": { + "type": "visa", + "last4": "3184", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s", + "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71", + "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d" + }, + { + "amount": "65215", + "status": "error", + "created_at": "2024-04-12T10:15:57.888183Z", + "error_code": "declined", + "captured_at": null, + "method_details": { + "card": { + "type": "visa", + "last4": "0002", + "expiry_year": 2025, + "expiry_month": 1, + "cardholder_name": "Michael McGovern" + }, + "type": "card", + "south_korea_local_card": null, + "underlying_details": null + }, + "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z", + "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d", + "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9" + } + ], + "billed_at": "2024-04-12T10:18:48.294633Z", + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T10:12:33.201400Z", + "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx", + "updated_at": "2024-04-12T10:18:49.738971Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": null, + "currency_code": "USD", + "billing_period": { + "ends_at": "2024-05-12T10:18:47.635628Z", + "starts_at": "2024-04-12T10:18:47.635628Z" + }, + "invoice_number": "325-10566", + "billing_details": null, + "collection_mode": "automatic", + "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny" +} diff --git a/tests/Unit/Entities/_fixtures/notification/entity/transaction.updated.json b/tests/Unit/Entities/_fixtures/notification/entity/transaction.updated.json index b211984f..a14b1875 100644 --- a/tests/Unit/Entities/_fixtures/notification/entity/transaction.updated.json +++ b/tests/Unit/Entities/_fixtures/notification/entity/transaction.updated.json @@ -1,275 +1,277 @@ { - "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", - "items": [ - { - "price": { - "id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "name": "Annual (per seat)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 100, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T13:57:54.249913Z", - "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "unit_price": { - "amount": "50000", - "currency_code": "USD" - }, - "updated_at": "2024-04-05T14:32:00.471447Z", - "custom_data": null, - "description": "Annual", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 50, - "proration": null + "id": "txn_01hv8m0mnx3sj85e7gxc6kga03", + "items": [ + { + "price": { + "id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "name": "Annual (per seat)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 100, + "minimum": 1 }, - { - "price": { - "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "name": "Annual (recurring addon)", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:00:40.265185Z", - "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "unit_price": { - "amount": "300000", - "currency_code": "USD" - }, - "updated_at": "2024-03-25T14:31:18.587603Z", - "custom_data": null, - "description": "Annual (recurring addon)", - "trial_period": null, - "billing_cycle": { - "interval": "year", - "frequency": 1 - }, - "unit_price_overrides": [], - "import_meta": null - }, - "quantity": 1, - "proration": null + "tax_mode": "account_setting", + "created_at": "2023-02-23T13:57:54.249913Z", + "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "unit_price": { + "amount": "50000", + "currency_code": "USD" + }, + "updated_at": "2024-04-05T14:32:00.471447Z", + "custom_data": null, + "description": "Annual", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 + }, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 50, + "proration": null + }, + { + "price": { + "id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "name": "Annual (recurring addon)", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:00:40.265185Z", + "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "unit_price": { + "amount": "300000", + "currency_code": "USD" + }, + "updated_at": "2024-03-25T14:31:18.587603Z", + "custom_data": null, + "description": "Annual (recurring addon)", + "trial_period": null, + "billing_cycle": { + "interval": "year", + "frequency": 1 }, - { - "price": { - "id": "pri_01gsz98e27ak2tyhexptwc58yk", - "name": "One-time addon", - "type": "standard", - "status": "active", - "quantity": { - "maximum": 1, - "minimum": 1 - }, - "tax_mode": "account_setting", - "created_at": "2023-02-23T14:01:28.391712Z", - "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "unit_price": { - "amount": "19900", - "currency_code": "USD" - }, - "updated_at": "2024-04-09T07:23:10.921392Z", - "custom_data": null, - "description": "One-time addon", - "trial_period": null, - "billing_cycle": null, - "unit_price_overrides": [], - "import_meta": null + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + }, + { + "price": { + "id": "pri_01gsz98e27ak2tyhexptwc58yk", + "name": "One-time addon", + "type": "standard", + "status": "active", + "quantity": { + "maximum": 1, + "minimum": 1 + }, + "tax_mode": "account_setting", + "created_at": "2023-02-23T14:01:28.391712Z", + "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "unit_price": { + "amount": "19900", + "currency_code": "USD" + }, + "updated_at": "2024-04-09T07:23:10.921392Z", + "custom_data": null, + "description": "One-time addon", + "trial_period": null, + "billing_cycle": null, + "unit_price_overrides": [], + "import_meta": null + }, + "quantity": 1, + "proration": null + } + ], + "origin": "api", + "status": "ready", + "details": { + "totals": { + "fee": null, + "tax": "225239", + "total": "2763149", + "credit": "0", + "balance": "2763149", + "discount": "281990", + "earnings": null, + "subtotal": "2819900", + "grand_total": "2763149", + "currency_code": "USD", + "credit_to_balance": "0", + "grand_total_tax": "225239" + }, + "line_items": [ + { + "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", + "totals": { + "tax": "199687", + "total": "2449687", + "discount": "250000", + "subtotal": "2500000" + }, + "product": { + "id": "pro_01gsz4vmqbjk3x4vvtafffd540", + "name": "AeroEdit Enterprise", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/Ws808ziTS76a6YbnMkiK_enterprise.png", + "created_at": "2023-02-23T12:44:34.923000Z", + "updated_at": "2024-04-05T15:58:28.309000Z", + "custom_data": { + "features": { + "sso": true, + "route_planning": true, + "payment_by_invoice": true, + "aircraft_performance": true, + "compliance_monitoring": true, + "flight_log_management": true }, - "quantity": 1, - "proration": null + "suggested_addons": [], + "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." + }, + "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", + "quantity": 50, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "3994", + "total": "48994", + "discount": "5000", + "subtotal": "50000" } - ], - "origin": "api", - "status": "ready", - "details": { + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", "totals": { - "fee": null, - "tax": "225239", - "total": "2763149", - "credit": "0", - "balance": "2763149", - "discount": "281990", - "earnings": null, - "subtotal": "2819900", - "grand_total": "2763149", - "currency_code": "USD", - "credit_to_balance": "0" + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" }, - "line_items": [ - { - "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf", - "totals": { - "tax": "199687", - "total": "2449687", - "discount": "250000", - "subtotal": "2500000" - }, - "product": { - "id": "pro_01gsz4vmqbjk3x4vvtafffd540", - "name": "AeroEdit Enterprise", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/Ws808ziTS76a6YbnMkiK_enterprise.png", - "created_at": "2023-02-23T12:44:34.923000Z", - "updated_at": "2024-04-05T15:58:28.309000Z", - "custom_data": { - "features": { - "sso": true, - "route_planning": true, - "payment_by_invoice": true, - "aircraft_performance": true, - "compliance_monitoring": true, - "flight_log_management": true - }, - "suggested_addons": [], - "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management." - }, - "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea", - "quantity": 50, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "3994", - "total": "48994", - "discount": "5000", - "subtotal": "50000" - } - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f", - "totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - }, - "product": { - "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", - "name": "VIP support", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/qgyipKJwRtq98YNboipo_vip-support.png", - "created_at": "2023-02-23T13:58:17.615000Z", - "updated_at": "2024-04-05T15:44:02.893000Z", - "custom_data": null, - "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "23962", - "total": "293962", - "discount": "30000", - "subtotal": "300000" - } - }, - { - "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", - "totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - }, - "product": { - "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", - "name": "Custom domains", - "type": "standard", - "status": "active", - "image_url": "https:\/\/paddle.s3.amazonaws.com\/user\/165798\/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", - "created_at": "2023-02-23T14:01:02.441000Z", - "updated_at": "2024-04-05T15:43:28.971000Z", - "custom_data": null, - "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", - "tax_category": "standard", - "import_meta": null - }, - "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", - "quantity": 1, - "proration": null, - "tax_rate": "0.08875", - "unit_totals": { - "tax": "1590", - "total": "19500", - "discount": "1990", - "subtotal": "19900" - } - } - ], - "payout_totals": null, - "tax_rates_used": [ - { - "totals": { - "tax": "225239", - "total": "2763149", - "discount": "281990", - "subtotal": "2819900" - }, - "tax_rate": "0.08875" - } - ], - "adjusted_payout_totals": null, - "adjusted_totals": { - "fee": "0", - "tax": "225239", - "total": "2763149", - "earnings": "0", - "subtotal": "2537910", - "grand_total": "2763149", - "currency_code": "USD", - "retained_fee": "0" + "product": { + "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz", + "name": "VIP support", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png", + "created_at": "2023-02-23T13:58:17.615000Z", + "updated_at": "2024-04-05T15:44:02.893000Z", + "custom_data": null, + "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.", + "tax_category": "standard", + "import_meta": null + }, + "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "23962", + "total": "293962", + "discount": "30000", + "subtotal": "300000" } - }, - "checkout": { - "url": null - }, - "payments": [], - "billed_at": null, - "address_id": "add_01hv8gq3318ktkfengj2r75gfx", - "created_at": "2024-04-12T07:40:38.007040Z", - "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", - "updated_at": "2024-04-12T10:00:03.871169Z", - "revised_at": null, - "business_id": null, - "custom_data": null, - "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", - "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", - "currency_code": "USD", - "billing_period": { - "ends_at": "2025-04-11T23:59:00.000000Z", - "starts_at": "2024-04-12T00:00:00.000000Z" - }, - "invoice_number": null, - "billing_details": { - "payment_terms": { - "interval": "day", - "frequency": 14 + }, + { + "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw", + "totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + }, + "product": { + "id": "pro_01gsz97mq9pa4fkyy0wqenepkz", + "name": "Custom domains", + "type": "standard", + "status": "active", + "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png", + "created_at": "2023-02-23T14:01:02.441000Z", + "updated_at": "2024-04-05T15:43:28.971000Z", + "custom_data": null, + "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.", + "tax_category": "standard", + "import_meta": null }, - "enable_checkout": false, - "purchase_order_number": "PO-123", - "additional_information": null + "price_id": "pri_01gsz98e27ak2tyhexptwc58yk", + "quantity": 1, + "proration": null, + "tax_rate": "0.08875", + "unit_totals": { + "tax": "1590", + "total": "19500", + "discount": "1990", + "subtotal": "19900" + } + } + ], + "payout_totals": null, + "tax_rates_used": [ + { + "totals": { + "tax": "225239", + "total": "2763149", + "discount": "281990", + "subtotal": "2819900" + }, + "tax_rate": "0.08875" + } + ], + "adjusted_payout_totals": null, + "adjusted_totals": { + "fee": "0", + "tax": "225239", + "total": "2763149", + "earnings": "0", + "subtotal": "2537910", + "grand_total": "2763149", + "currency_code": "USD", + "retained_fee": "0", + "grand_total_tax": "225239" + } + }, + "checkout": { + "url": null + }, + "payments": [], + "billed_at": null, + "address_id": "add_01hv8gq3318ktkfengj2r75gfx", + "created_at": "2024-04-12T07:40:38.007040Z", + "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf", + "updated_at": "2024-04-12T10:00:03.871169Z", + "revised_at": null, + "business_id": null, + "custom_data": null, + "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4", + "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3", + "currency_code": "USD", + "billing_period": { + "ends_at": "2025-04-11T23:59:00.000000Z", + "starts_at": "2024-04-12T00:00:00.000000Z" + }, + "invoice_number": null, + "billing_details": { + "payment_terms": { + "interval": "day", + "frequency": 14 }, - "collection_mode": "manual", - "subscription_id": null -} \ No newline at end of file + "enable_checkout": false, + "purchase_order_number": "PO-123", + "additional_information": null + }, + "collection_mode": "manual", + "subscription_id": null +}