Feature/set user id in stripe callback (#184)
* Set user id as description * Update changelog
This commit is contained in:
parent
9832334da1
commit
367f25a975
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Set the user id in the _Stripe_ callback
|
||||||
|
|
||||||
## 1.21.0 - 22.06.2021
|
## 1.21.0 - 22.06.2021
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -38,9 +38,6 @@ export class SubscriptionService {
|
|||||||
quantity: 1
|
quantity: 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
metadata: {
|
|
||||||
user_id: userId
|
|
||||||
},
|
|
||||||
mode: 'payment',
|
mode: 'payment',
|
||||||
payment_method_types: ['card'],
|
payment_method_types: ['card'],
|
||||||
success_url: `${this.configurationService.get(
|
success_url: `${this.configurationService.get(
|
||||||
@ -81,6 +78,10 @@ export class SubscriptionService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await this.stripe.customers.update(session.customer as string, {
|
||||||
|
description: session.client_reference_id
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user