Skip to content

Commit

Permalink
use api endpoint of stripe.rackbox.net
Browse files Browse the repository at this point in the history
  • Loading branch information
keikubo committed Sep 3, 2012
1 parent 12d1333 commit abc91a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/webpay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require 'set'
require 'rubygems'
require 'openssl'
require 'base64'

gem 'rest-client', '~> 1.4'
require 'rest_client'
Expand Down Expand Up @@ -46,7 +47,8 @@
module Webpay
@@ssl_bundle_path = File.join(File.dirname(__FILE__), 'data/ca-certificates.crt')
@@api_key = nil
@@api_base = 'https://api.webpay.com/v1'
# @@api_base = 'https://api.webpay.jp/v1'
@@api_base = 'https://stripe.rackbox.net/v1'
@@verify_ssl_certs = true

def self.api_url(url='')
Expand Down Expand Up @@ -135,7 +137,7 @@ def self.request(method, url, api_key, params=nil, headers={})

headers = {
:user_agent => "Webpay/v1 RubyBindings/#{Webpay::VERSION}",
:authorization => "Bearer #{api_key}"
:authorization => "Basic #{Base64.encode64(api_key)}"
}.merge(headers)
opts = {
:method => method,
Expand Down

0 comments on commit abc91a3

Please sign in to comment.