mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user