pnpm install
pnpm run dev
- This challenge is about creating a simple web page that displays the credits of a customer.
- This challenge is about adding a feature, where besides the monthly credits of a customer, the user can also add additional credits.
-
This challenge is about adding a feature, where the user can use an online service to pay for the additional credits.
-
Concept:
-
Integration the payment service:
- choose a payment service
- create an account and integrate the payment functionality into the app and the billing service
-
Update the user interface:
- add a button to the user interface that allows the user to buy additional credits
- the user should be able to choose the amount of credits to buy
-
Billing logic:
- add a new endpoint to the billing service that allows the user to buy additional credits
- the logic should calculate the price of the credits and create a new invoice for the user
- it should be checked if the user is allowed to buy additional credits
-
Communicating with the payment service:
- when the customer submits the payment request, the billing service should communicate with the payment service
-
Processing the payment:
- the payment service should process the payment and return a success or error message
-
Updating the credit balance:
- if the transaction was successful, the billing service should update the credit balance of the user
-
Acknowledging the payment:
- the billing service should send an email to the user to acknowledge the payment
-
Error handling:
- if there was and error during the payment process, the billing service should send an email to the user to inform him about the error
-
Security and privacy:
- all user data should be transfered securely and encrypted
-
Refund:
- there should be a way to refund the payment
-
Testing and monitoring:
- there should be extensive testing to make sure that the payment process works as expected
- there should be monitoring to make sure that the payment process works as expected
-