discourse-subscriptions/assets/javascripts/discourse/models/payment.js.es6

17 lines
351 B
Plaintext
Raw Normal View History

2019-12-17 00:31:58 -05:00
import EmberObject from "@ember/object";
import { ajax } from "discourse/lib/ajax";
2019-12-17 00:31:58 -05:00
const Payment = EmberObject.extend({
save() {
const data = {
payment_method: this.payment_method,
amount: this.amount,
currency: this.currency
};
return ajax("/s/payments", { method: "post", data });
}
});
export default Payment;