internxt / drive-web

https://internxt.com/drive
GNU Affero General Public License v3.0
118 stars 26 forks source link

[PB-2115] feat: edit payment method for B2B and individual subscription #1151

Closed evillalba94 closed 3 months ago

evillalba94 commented 4 months ago

This example must be adapted to be dynamic (business or individual).

Explanation

To implement this, a new endpoint was created that must receive the paymentMethodId and the subscriptionType (business or individual) on which the payment method must be updated.

It is important that when creating the payment method, a type field is created in the metadata to identify which subscription it was created for. Available options: business and individual.

Once the payment method has been created, proceed to send it to the new endpoint.

Note: The SDK update must be taken into account for the consumption of the endpoint. PR Sdk: https://github.com/internxt/sdk/pull/206

Endpoint

URL: /subscriptions/update-payment-method Method: POST Body

    {
        paymentMethodId: { type: 'string' },
        subscriptionType: { type: 'string', enum: ['business', 'individual'] },
    }
vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drive-web ❌ Failed (Inspect) Jun 12, 2024 6:54pm
sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

evillalba94 commented 3 months ago

The adaptation was modified so this PR is not necessary.