PayWay v0.1.0 PayWay.API.Transaction

Transaction handling.

Link to this section Summary

Link to this section Functions

Link to this function make_payment(payment_method_ref, receivable_account, principle_amount, order_number \\ "")
make_payment(String.t, String.t, number, String.t) :: map

Makes a new payment transaction.

payment_method_ref is the “customerNumber” in PayWay, it is effectively a customer’s payment method (either a credit card or a bank account) used for the transaction.

We are sending the receivable_account as both “merchantId” and “bankAccountId” so that we don’t have to look up what payment method the payment_method_ref is, and PayWay ignores the field when the payment method mismatches.

Link to this function surcharge_for(payment_method_ref, principle_amount)
surcharge_for(String.t, number) :: number