module Moka::Request
Public Class Methods
dealer_authentication(details)
click to toggle source
# File lib/moka/request.rb, line 41 def dealer_authentication(details) { "DealerCode": details.dealer_code, "Username": details.username, "Password": details.password, "CheckKey": details.check_key } end
get_check_key(dealer_code, username, password)
click to toggle source
# File lib/moka/request.rb, line 30 def get_check_key(dealer_code, username, password) RestClient.get 'http://developer.moka.com/pages/checkkey.php', { params: { DealerCode: dealer_code, Username: username, Password: password } } end
set_env()
click to toggle source
# File lib/moka/request.rb, line 17 def set_env $SERVICE_URL = Moka.config.env == 'production' ? "https://service.moka.com" : "https://service.testmoka.com" $DIRECT_PAYMENT_URL = "#{$SERVICE_URL}/PaymentDealer/DoDirectPayment" $DIRECT3D_PAYMENT_URL = "#{$SERVICE_URL}/PaymentDealer/DoDirectPaymentThreeD" $CAPTURE_PAYMENT_URL = "#{$SERVICE_URL}/PaymentDealer/DoCapture" $GET_PAYMENT_LIST_URL = "#{$SERVICE_URL}/PaymentDealer/GetPaymentList" $ADD_CUSTOMER_URL = "#{$SERVICE_URL}/DealerCustomer/AddCustomer" $UPDATE_CUSTOMER_URL = "#{$SERVICE_URL}/DealerCustomer/UpdateCustomer" end