# lib/credit_card__payment_payload.rb
class CreditCardPaymentPayload
def initialize(payment)
end
def record
end
def to_json
end
end
# lib/virtual_account__payment_payload.rb
class VirtualAccountPaymentPayload
def initialize(payment)
end
def record
end
def to_json
end
end
# app/services/payments_services/send_callback_to_service.rb
class SendPaymentCallbackToService
def initialize(service:, payload:)
end
def call
Faraday.post(service.url, payload.to_json)
create_callback_record(payload.record)
end
end
Last active
February 24, 2021 02:50
-
-
Save philiplambok/7b2d579b75b6828131012fbe80e171a7 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment