-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make MMA aware of new Stripe Membership USA account #1371
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,60 @@ export const guardianWeeklySubscriptionAustralia: Subscription = { | |
deliveryAddressChangeEffectiveDate: '2021-12-24', | ||
}; | ||
|
||
export const guardianWeeklySubscriptionUnitedStates: Subscription = { | ||
paymentMethod: 'Card', | ||
card: { | ||
last4: '4242', | ||
expiry: { | ||
month: 3, | ||
year: 2033, | ||
}, | ||
type: 'Visa', | ||
stripePublicKeyForUpdate: 'pk_test_123', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't traced the code fully, but it seems like the public key is coming from MDAPI in some? cases and it would be based off the billing country. https://github.com/guardian/members-data-api/blob/7094e7fd2927c97101fa11c7b29050aa55afd31b/membership-attribute-service/app/services/AccountDetailsFromZuora.scala#L52 If it's all tested with GW and other products and works ok then it's probably ok, I think GW is the most tricky with the billing vs delivery country plus currencies. (we lock the delivery country and currency together IIRC so that people definitely pay the right price) |
||
email: 'test.user@example.com', | ||
}, | ||
contactId: '0039E00001KA26BQAT', | ||
deliveryAddress: { | ||
addressLine1: 'Kings Place', | ||
addressLine2: '90 York Way', | ||
town: 'New York', | ||
region: 'NY', | ||
postcode: '10001', | ||
country: 'United States', | ||
}, | ||
safeToUpdatePaymentMethod: true, | ||
start: '2021-12-24', | ||
end: '2022-12-15', | ||
nextPaymentPrice: 3250, | ||
nextPaymentDate: '2021-12-24', | ||
lastPaymentDate: null, | ||
potentialCancellationDate: null, | ||
chargedThroughDate: null, | ||
renewalDate: '2022-12-15', | ||
anniversaryDate: '2022-12-24', | ||
cancelledAt: false, | ||
subscriptionId: 'A-S00293857', | ||
trialLength: 9, | ||
autoRenew: true, | ||
currentPlans: [], | ||
futurePlans: [ | ||
{ | ||
name: null, | ||
start: '2021-12-24', | ||
end: '2022-12-15', | ||
shouldBeVisible: true, | ||
chargedThrough: null, | ||
price: 3250, | ||
currency: '$', | ||
currencyISO: 'AUD', | ||
billingPeriod: 'month', | ||
}, | ||
], | ||
readerType: 'Direct', | ||
accountId: '8ad0965d7dbcc507017dbe20afd33ac4', | ||
deliveryAddressChangeEffectiveDate: '2021-12-24', | ||
}; | ||
|
||
export const digitalSubscriptionDD: Subscription = { | ||
paymentMethod: 'DirectDebit', | ||
account: { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why create the whole
guardianWeeklySubscriptionUnitedStates
object only to pick out just the delivery country?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks John - I have refactored here: 28d8365