class MidtransApi::Api::CreditCard::Charge

Constants

PATH
PAYMENT_TYPE

Public Instance Methods

post(params) click to toggle source
# File lib/midtrans_api/api/credit_card/charge.rb, line 10
def post(params)
  response = client.post(PATH,
                         transaction_details: params[:transaction_details],
                         item_details: params[:item_details],
                         customer_details: params[:customer_details],
                         payment_type: PAYMENT_TYPE,
                         credit_card: params[:credit_card])
  MidtransApi::Model::CreditCard::Charge.new(response)
end