diff --git a/app/services/payment_providers/adyen_service.rb b/app/services/payment_providers/adyen_service.rb index be90a56a9da..3dc54a66071 100644 --- a/app/services/payment_providers/adyen_service.rb +++ b/app/services/payment_providers/adyen_service.rb @@ -143,7 +143,6 @@ def update_payment_status(event, payment_type) metadata = { payment_type:, lago_invoice_id: event.dig('additionalData', 'metadata.lago_invoice_id'), - lago_invoice_ids: event.dig('additionalData', 'metadata.lago_invoice_ids'), lago_payment_request_id: event.dig('additionalData', 'metadata.lago_payment_request_id'), lago_payable_type: event.dig('additionalData', 'metadata.lago_payable_type') } diff --git a/app/services/payment_requests/payments/adyen_service.rb b/app/services/payment_requests/payments/adyen_service.rb index e06cbcc5e7b..1c9ab125c49 100644 --- a/app/services/payment_requests/payments/adyen_service.rb +++ b/app/services/payment_requests/payments/adyen_service.rb @@ -190,7 +190,6 @@ def payment_url_params metadata: { lago_customer_id: customer.id, lago_payment_request_id: payable.id, - lago_invoice_ids: payable.invoice_ids, payment_type: "one-time" } } diff --git a/app/services/payment_requests/payments/gocardless_service.rb b/app/services/payment_requests/payments/gocardless_service.rb index 9b2adc54a31..e137b524f63 100644 --- a/app/services/payment_requests/payments/gocardless_service.rb +++ b/app/services/payment_requests/payments/gocardless_service.rb @@ -141,8 +141,7 @@ def create_gocardless_payment retry_if_possible: false, metadata: { lago_customer_id: customer.id, - lago_payment_request_id: payable.id, - lago_invoice_ids: payable.invoice_ids + lago_payment_request_id: payable.id }, links: { mandate: mandate_id diff --git a/app/services/payment_requests/payments/stripe_service.rb b/app/services/payment_requests/payments/stripe_service.rb index 3248e6181b0..421ce5ce06e 100644 --- a/app/services/payment_requests/payments/stripe_service.rb +++ b/app/services/payment_requests/payments/stripe_service.rb @@ -204,8 +204,7 @@ def stripe_payment_payload description:, metadata: { lago_customer_id: customer.id, - lago_payment_request_id: payable.id, - lago_invoice_ids: payable.invoice_ids + lago_payment_request_id: payable.id } } end @@ -271,7 +270,6 @@ def payment_url_payload metadata: { lago_customer_id: customer.id, lago_payment_request_id: payable.id, - lago_invoice_ids: payable.invoice_ids, payment_type: "one-time" } } diff --git a/spec/fixtures/adyen/webhook_authorisation_payment_response_invalid_payable.json b/spec/fixtures/adyen/webhook_authorisation_payment_response_invalid_payable.json index e130476a073..510d31470ca 100644 --- a/spec/fixtures/adyen/webhook_authorisation_payment_response_invalid_payable.json +++ b/spec/fixtures/adyen/webhook_authorisation_payment_response_invalid_payable.json @@ -14,7 +14,6 @@ "threeds2.cardEnrolled": "false", "recurringProcessingModel": "CardOnFile", "metadata.lago_payment_request_id": "ec82efeb-88bb-44f8-ba30-0d55b3fd583a", - "metadata.lago_invoice_ids": ["invoice_id_1", "invoice_id_2"], "metadata.lago_payable_type": "InvalidPayableTypeName" }, "amount": { diff --git a/spec/fixtures/adyen/webhook_authorisation_payment_response_payment_request.json b/spec/fixtures/adyen/webhook_authorisation_payment_response_payment_request.json index 94cb9776ccc..6892eafc4e1 100644 --- a/spec/fixtures/adyen/webhook_authorisation_payment_response_payment_request.json +++ b/spec/fixtures/adyen/webhook_authorisation_payment_response_payment_request.json @@ -14,7 +14,6 @@ "threeds2.cardEnrolled": "false", "recurringProcessingModel": "CardOnFile", "metadata.lago_payment_request_id": "ec82efeb-88bb-44f8-ba30-0d55b3fd583a", - "metadata.lago_invoice_ids": ["invoice_id_1", "invoice_id_2"], "metadata.lago_payable_type": "PaymentRequest" }, "amount": { diff --git a/spec/fixtures/stripe/charge_event_invalid_payable_type.json b/spec/fixtures/stripe/charge_event_invalid_payable_type.json index 89db8d52015..a1304cf3c71 100644 --- a/spec/fixtures/stripe/charge_event_invalid_payable_type.json +++ b/spec/fixtures/stripe/charge_event_invalid_payable_type.json @@ -45,7 +45,6 @@ "livemode": false, "metadata": { "lago_payment_request_id": "a587e552-36bc-4334-81f2-abcbf034ad3f", - "lago_invoice_ids": ["invoice_id_1", "invoice_id_2"], "lago_payable_type": "InvalidPayableTypeName" }, "on_behalf_of": null, diff --git a/spec/fixtures/stripe/charge_event_payment_request.json b/spec/fixtures/stripe/charge_event_payment_request.json index 6556e64fd22..ed1e708c999 100644 --- a/spec/fixtures/stripe/charge_event_payment_request.json +++ b/spec/fixtures/stripe/charge_event_payment_request.json @@ -45,7 +45,6 @@ "livemode": false, "metadata": { "lago_payment_request_id": "a587e552-36bc-4334-81f2-abcbf034ad3f", - "lago_invoice_ids": ["invoice_id_1", "invoice_id_2"], "lago_payable_type": "PaymentRequest" }, "on_behalf_of": null, diff --git a/spec/fixtures/stripe/payment_intent_event_invalid_payable_type.json b/spec/fixtures/stripe/payment_intent_event_invalid_payable_type.json index 89524200085..a31dd6e5c65 100644 --- a/spec/fixtures/stripe/payment_intent_event_invalid_payable_type.json +++ b/spec/fixtures/stripe/payment_intent_event_invalid_payable_type.json @@ -36,7 +36,6 @@ "livemode": false, "metadata": { "lago_payment_request_id": "a587e552-36bc-4334-81f2-abcbf034ad3f", - "lago_invoice_ids": ["invoice_id_1", "invoice_id_2"], "lago_payable_type": "InvalidPayableTypeName" }, "next_action": null, diff --git a/spec/fixtures/stripe/payment_intent_event_payment_request.json b/spec/fixtures/stripe/payment_intent_event_payment_request.json index 1d4ec2e62d9..8df56067404 100644 --- a/spec/fixtures/stripe/payment_intent_event_payment_request.json +++ b/spec/fixtures/stripe/payment_intent_event_payment_request.json @@ -36,7 +36,6 @@ "livemode": false, "metadata": { "lago_payment_request_id": "a587e552-36bc-4334-81f2-abcbf034ad3f", - "lago_invoice_ids": ["invoice_id_1", "invoice_id_2"], "lago_payable_type": "PaymentRequest" }, "next_action": null, diff --git a/spec/services/payment_providers/stripe_service_spec.rb b/spec/services/payment_providers/stripe_service_spec.rb index 03427624566..b0fb5ab06ee 100644 --- a/spec/services/payment_providers/stripe_service_spec.rb +++ b/spec/services/payment_providers/stripe_service_spec.rb @@ -262,7 +262,6 @@ provider_payment_id: "pi_1JKS2Y2VYugoKSBzNHPFBNj9", status: "succeeded", metadata: { - lago_invoice_ids: %w[invoice_id_1 invoice_id_2], lago_payment_request_id: "a587e552-36bc-4334-81f2-abcbf034ad3f", lago_payable_type: "PaymentRequest" } @@ -338,7 +337,6 @@ provider_payment_id: 'pi_123456', status: "succeeded", metadata: { - lago_invoice_ids: %w[invoice_id_1 invoice_id_2], lago_payment_request_id: "a587e552-36bc-4334-81f2-abcbf034ad3f", lago_payable_type: "PaymentRequest" } diff --git a/spec/services/payment_requests/payments/adyen_service_spec.rb b/spec/services/payment_requests/payments/adyen_service_spec.rb index 92b6c7e42ee..4c651e20195 100644 --- a/spec/services/payment_requests/payments/adyen_service_spec.rb +++ b/spec/services/payment_requests/payments/adyen_service_spec.rb @@ -314,7 +314,6 @@ merchantAccount: adyen_payment_provider.merchant_account, metadata: { lago_customer_id: customer.id, - lago_invoice_ids: [invoice_1.id, invoice_2.id], lago_payment_request_id: payment_request.id, payment_type: "one-time" }, diff --git a/spec/services/payment_requests/payments/gocardless_service_spec.rb b/spec/services/payment_requests/payments/gocardless_service_spec.rb index 83308db80d4..c6cc29424fd 100644 --- a/spec/services/payment_requests/payments/gocardless_service_spec.rb +++ b/spec/services/payment_requests/payments/gocardless_service_spec.rb @@ -103,7 +103,6 @@ links: {mandate: "mandate_id"}, metadata: { lago_customer_id: customer.id, - lago_invoice_ids: [invoice_1.id, invoice_2.id], lago_payment_request_id: payment_request.id }, retry_if_possible: false diff --git a/spec/services/payment_requests/payments/stripe_service_spec.rb b/spec/services/payment_requests/payments/stripe_service_spec.rb index 42a96bfea1f..dc497f3ccea 100644 --- a/spec/services/payment_requests/payments/stripe_service_spec.rb +++ b/spec/services/payment_requests/payments/stripe_service_spec.rb @@ -115,8 +115,7 @@ description: "#{organization.name} - Overdue invoices", metadata: { lago_customer_id: customer.id, - lago_payment_request_id: payment_request.id, - lago_invoice_ids: payment_request.invoice_ids + lago_payment_request_id: payment_request.id } }, hash_including( @@ -403,7 +402,6 @@ metadata: { lago_customer_id: customer.id, lago_payment_request_id: payment_request.id, - lago_invoice_ids: payment_request.invoice_ids, payment_type: "one-time" } }