Add another missing method to StripeJS mock

Our Angular code calls this method in some tests and expects a Promise object with a hash describing a payment method.
This commit is contained in:
Matt-Yorkley
2020-09-18 20:24:08 +01:00
parent 857f4e3a37
commit 368772dad2

View File

@@ -22,6 +22,22 @@ window.Stripe = () => {
};
return {
createPaymentMethod: () => {
return new Promise(resolve => {
resolve({
paymentMethod: {
id: "pm_123",
card: {
brand: 'visa',
last4: fetchLastFour(),
exp_month: "10",
exp_year: "2050"
}
}
});
});
},
elements: () => {
return {
create: (type, options) => new Element()