일시적인 해결책으로 동작을 확인하기 위해 app/controllers/discourse_subscriptions/subscribe_controller.rb 파일에 Stripe API Reference - Invoices 플래그를 추가했습니다.
추가된 내용:
automatic_tax: { enabled: true}
아래를 참고하세요:
transaction =
::Stripe::Subscription.create(
customer: customer[:id],
items: [{ price: params[:plan] }],
metadata: metadata_user,
trial_period_days: trial_days,
promotion_code: promo_code_id,
automatic_tax: { enabled: true}
)
이 해결책으로 당분간 운영할 수 있을 것으로 생각되며, 해당 기능이 공식적으로 추가되면 원래대로 되돌리면 될 것 같습니다. 나중에 큰 문제가 되지 않을지 확인하기 위해 라이브에 올리기 전에 이 부분을 고려해야 합니다.
공식 기능이 되기 전에 이 기능이 동작해야 하는 경우, 왜 이것이 나쁜 아이디어인지에 대해 어떤 생각이 있으신가요?