View Source BasePayment.CreditCardBehaviour behaviour (ex_payments_template v0.1.0)
Credit card behaviour for payment gateways.
Summary
Callbacks
@callback create_token( payload :: %BasePayment.CardTokenPayload{ card_number: term(), expiration_month: term(), expiration_year: term(), meta: term(), name: term(), security_code: term() } ) :: {:ok, %BasePayment.SuccessResponse{formatted_response: term(), status: term()}} | {:error, %BasePayment.ErrorResponse{formatted_response: term(), status: term()}}
@callback process_payment( payload :: %BasePayment.CreditCardPayload{ amount: term(), brand: term(), meta: term(), monthly_selected_plan: term(), payer: term(), token: term() } ) :: {:ok, %BasePayment.SuccessResponse{formatted_response: term(), status: term()}} | {:error, %BasePayment.ErrorResponse{formatted_response: term(), status: term()}}