You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Creates a transaction with a payment method and an amount
//
// @param [PaymentMethod] paymentMethod the payment method to charge
// @param [Number] amount the amount to charge to the payment method
// @return [Transaction] the built transaction representing the charge
charge(paymentMethod, amount) {
if (
this.transactions()
.target()
.detect(t => t.paymentMethod() == paymentMethod)
)
return
return this.transactions().build({
amount: amount,
paymentMethod: paymentMethod
})
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: