Laura10101 / contractor-tax-calculator

0 stars 2 forks source link

JSONDecodeError after selecting subscription option to pay for #187

Closed Laura10101 closed 11 months ago

Laura10101 commented 11 months ago

Steps to reproduce

  1. Sign in with user account that has expired subscription
  2. Choose to create new tax calculation
  3. Select a subscription option and click submit button

Expected result The checkout page should be displayed with the correct price for the chosen subscription option

Actual result The following JSONDecodeError is dsiplayed:

JSONDecodeError at /checkout/ Expecting value: line 1 column 1 (char 0)

Laura10101 commented 11 months ago

The checkout view was hardcoded to post new payments with a null subscription_id. This was done initially because the susbcription_id is not readily obtainable by the checkout view. The payments API and subscription signals were therefore updated to use the user_id rather than the subscription_id to link payments to the subscriptions which should be updated.