Skip to content

Commit 617bd55

Browse files
committed
DEBUG
1 parent de3dfdb commit 617bd55

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

components/dashboard/src/settings/Account.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { PaymentContext } from "../payment-context";
1717
export default function Account() {
1818
const { user } = useContext(UserContext);
1919
const { showPaymentUI } = useContext(PaymentContext);
20+
console.log('showPaymentUI', showPaymentUI);
2021

2122
const [modal, setModal] = useState(false);
2223
const [typedEmail, setTypedEmail] = useState('');

components/dashboard/src/teams/TeamPlans.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export default function TeamPlans() {
2121
const location = useLocation();
2222
const team = getCurrentTeam(location, teams);
2323
const [ members, setMembers ] = useState<TeamMemberInfo[]>([]);
24-
const { showPaymentUI, currency, setCurrency } = useContext(PaymentContext);
24+
const { showPaymentUI, currency, setCurrency, isChargebeeCustomer } = useContext(PaymentContext);
25+
console.log('members', members.length, 'showPaymentUI', showPaymentUI, 'currency', currency, 'isChargebeeCustomer', isChargebeeCustomer);
2526

2627
useEffect(() => {
2728
if (!team) {

components/ee/payment-endpoint/src/chargebee/endpoint-controller.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class EndpointController {
2323

2424
get apiRouter(): express.Router {
2525
passport.use(new BasicStrategy((username, password, cb) => {
26+
log.warn('Chargebee basic strategy');
2627
if (username === this.config.chargebeeWebhook.user
2728
&& password === this.config.chargebeeWebhook.password) {
2829
return cb(null, username);
@@ -36,6 +37,7 @@ export class EndpointController {
3637
router.use(bodyParser.urlencoded({ extended: true }))
3738
router.post(PaymentProtocol.UPDATE_GITPOD_SUBSCRIPTION_PATH,
3839
(req: express.Request, res: express.Response, next: express.NextFunction) => {
40+
log.info('Receiving Chargebee event!');
3941
passport.authenticate('basic', { session: false }, (err: any, user: any, info: any) => {
4042
if (err) {
4143
log.error(`Login error on chargebee payment update route!`, err, req);
@@ -61,6 +63,7 @@ export class EndpointController {
6163
* @param res
6264
*/
6365
private async handleUpdateGitpodSubscription(req: express.Request, res: express.Response) {
66+
log.info('Chargebee handleUpdateGitpodSubscription!');
6467
if (!req.body || !req.body.event_type) {
6568
log.error('Received malformed event request from chargebee!');
6669
return;
@@ -70,7 +73,7 @@ export class EndpointController {
7073
const handled = await this.eventHandler.handle(req.body);
7174
if (!handled) {
7275
const payload = { chargebeeEventType: req.body.event_type, action: 'ignored' };
73-
log.debug(`Faithfully ignoring chargebee event of type: ${req.body.event_type}`, payload);
76+
log.warn(`Faithfully ignoring chargebee event of type: ${req.body.event_type}`, payload);
7477
}
7578
res.status(200).send();
7679
} catch (err) {

0 commit comments

Comments
 (0)