Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: payment amount #3621

Merged
merged 4 commits into from
Aug 2, 2023
Merged

fix: payment amount #3621

merged 4 commits into from
Aug 2, 2023

Conversation

geniuxy
Copy link
Contributor

@geniuxy geniuxy commented Aug 2, 2023

🤖 Generated by Copilot at 2fc055e

Summary

🏷️🧮🗑️

This pull request improves the code quality and functionality of the account controller and the pay package. It removes redundant logging, enables default payment handling, fixes a unit conversion bug, and adds a kubebuilder annotation for the PaymentSpec type.

We are the kubebuilders, we set the defaults
We reconcile the payments, we fix the amounts
We remove the errors, we clean the code
We pay with wechat, we hack the mode

Walkthrough

  • Set default value of PaymentMethod field to wechat in PaymentSpec type using kubebuilder annotation (link)
  • Remove redundant error messages from logger calls in Reconcile and DeletePayment functions of AccountReconciler struct in account_controller.go (link, link, link)
  • Convert Amount field from fen to yuan when calling CreatePayment function in Reconcile function of PaymentReconciler struct in payment_controller.go (link)
  • Remove unused import of fmt package from pay package in interface.go (link)
  • Comment out error return and add TODO comment in NewPayHandler function of pay package in interface.go as a temporary workaround for unsupported payment methods (link)

@sealos-ci-robot
Copy link
Member

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 918
✅ Successful 351
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 566
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (5876545) 67.92% compared to head (2fc055e) 67.92%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3621   +/-   ##
=======================================
  Coverage   67.92%   67.92%           
=======================================
  Files           8        8           
  Lines         664      664           
=======================================
  Hits          451      451           
  Misses        171      171           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bxy4543 bxy4543 added this to the v5.0 milestone Aug 2, 2023
@bxy4543 bxy4543 merged commit e2fde2e into labring:main Aug 2, 2023
112 checks passed
@geniuxy geniuxy deleted the pay branch August 9, 2023 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants