mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
[WIP] Amazon refactor to lib (#8403)
* Moved amazon tests to folder * Abstracted amazon payment code and added initial test * Abstracted cancel and subscribe logic to amazon payment lib * Added arg checks to checkout * Added constants. Added more subscription test * Added with arg checks to cancel * Fixed linting issues * Added integration tests for amazon subscribe cancel * Added integration test for amazon checkout * Added integration test for amazon subscribe * Added coupon unit test * Fixed lint * Fixed minor test issue and changed header expectations * Fixed line endings
This commit is contained in:
@@ -22,6 +22,7 @@ import { sendNotification as sendPushNotification } from '../../libs/pushNotific
|
||||
import pusher from '../../libs/pusher';
|
||||
import common from '../../../common';
|
||||
import payments from '../../libs/payments';
|
||||
import amzLib from '../../libs/amazonPayments';
|
||||
import shared from '../../../common';
|
||||
|
||||
|
||||
@@ -175,7 +176,7 @@ api.createGroupPlan = {
|
||||
let groupId = savedGroup._id;
|
||||
let headers = req.headers;
|
||||
|
||||
await payments.subscribeWithAmazon({
|
||||
await amzLib.subscribe({
|
||||
billingAgreementId,
|
||||
sub,
|
||||
coupon,
|
||||
|
||||
Reference in New Issue
Block a user