mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Support subscription payment through Google Play Store (#8437)
* Support subscription payment through Google Play Store * minor fixes to iap subscriptions * Support subscription payment through Google Play Store * minor fixes to iap subscriptions * revert change to test * add unit tests for google payments * add integration tests for google payments * change config formatting for play api * fix typo in file name * fix typo in example config * Improve google payment tests * fix linter errors
This commit is contained in:
committed by
Sabe Jones
parent
a002bc5e20
commit
4d0295a60d
@@ -106,6 +106,9 @@ api.createSubscription = async function createSubscription (data) {
|
||||
// Specify a lastBillingDate just for Amazon Payments
|
||||
// Resetted every time the subscription restarts
|
||||
lastBillingDate: data.paymentMethod === 'Amazon Payments' ? today : undefined,
|
||||
nextPaymentProcessing: data.nextPaymentProcessing,
|
||||
nextBillingDate: data.nextBillingDate,
|
||||
additionalData: data.additionalData,
|
||||
owner: data.user._id,
|
||||
}).defaults({ // allow non-override if a plan was previously used
|
||||
gemsBought: 0,
|
||||
|
||||
Reference in New Issue
Block a user