Class: AruxApp::API::Checkout
- Inherits:
-
Object
- Object
- AruxApp::API::Checkout
- Defined in:
- lib/arux_app/api/checkout.rb
Constant Summary collapse
- API_VERSION =
1
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.api_route ⇒ Object
22 23 24 |
# File 'lib/arux_app/api/checkout.rb', line 22 def self.api_route "#{api_uri}/api/v#{API_VERSION}/" end |
.api_uri ⇒ Object
14 15 16 |
# File 'lib/arux_app/api/checkout.rb', line 14 def self.api_uri AruxApp::API.uri(subdomain: "pay.api") end |
.iframe_url ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/arux_app/api/checkout.rb', line 26 def self.iframe_url case AruxApp::API.mode when :production "https://htp.tokenex.com/Iframe/Iframe-v3.min.js" when :staging, :development, :test "https://test-htp.tokenex.com/Iframe/Iframe-v3.min.js" else raise "AruxApp::API environment not supported" end end |
Instance Method Details
#api_uri ⇒ Object
18 19 20 |
# File 'lib/arux_app/api/checkout.rb', line 18 def api_uri self.class.api_uri end |
#public_uri ⇒ Object
10 11 12 |
# File 'lib/arux_app/api/checkout.rb', line 10 def public_uri self.class.public_uri end |