discourse-subscriptions/test/javascripts/helpers/stripe.js.es6

25 lines
433 B
Plaintext
Raw Normal View History

import { Promise } from "rsvp";
2019-10-08 20:53:58 -04:00
export function stubStripe() {
window.Stripe = () => {
return {
createPaymentMethod() {
return new Promise((resolve) => {
2019-10-08 20:53:58 -04:00
resolve({});
});
},
elements() {
return {
create() {
return {
on() {},
card() {},
mount() {},
2019-10-08 20:53:58 -04:00
};
},
2019-10-08 20:53:58 -04:00
};
},
2019-10-08 20:53:58 -04:00
};
};
}