mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-03-06 17:49:24 +00:00
- Replace deprecated methods on client - Fix broken dropdowns due to select kit 2 upgrade - Graceful error handling when Stripe keys are not configured but plugin enabled
25 lines
428 B
JavaScript
25 lines
428 B
JavaScript
import { Promise } from "rsvp";
|
|
|
|
export function stubStripe() {
|
|
window.Stripe = () => {
|
|
return {
|
|
createPaymentMethod() {
|
|
return new Promise(resolve => {
|
|
resolve({});
|
|
});
|
|
},
|
|
elements() {
|
|
return {
|
|
create() {
|
|
return {
|
|
on() {},
|
|
card() {},
|
|
mount() {}
|
|
};
|
|
}
|
|
};
|
|
}
|
|
};
|
|
};
|
|
}
|