This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_merchant' | |
ActiveMerchant::Billing::Base.mode = :test | |
gateway = ActiveMerchant::Billing::WebpayGateway.new(:login => 'test_secret_eHn4TTgsGguBcW764a2KA8Yd') | |
amount = 10000 # 100 yen | |
credit_card = ActiveMerchant::Billing::CreditCard.new( | |
:first_name => 'Kei', | |
:last_name => 'Kubo', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'twilio-ruby' | |
require 'webpay' | |
post '/' do | |
Twilio::TwiML::Response.new do |r| | |
r.Gather :timeout => "10", :finishOnKey => "*", :action => '/month' do |g| | |
g.Say "Please enter your credit card number and then press star." | |
end | |
end.text | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1111.94 - 1139.17 (coinbase) | |
1115.51 - 1117.51 (bitstamp) | |
1224.00001 - 1224.4 (Mt. Gox) | |
1116.46849 - 1125.42705 (Kraken) | |
1041.18 - 1042 (BTC-E) | |
1093.2799 - 1096.4686 (itBit) | |
1168.305 - 1203.450 (Justcoin BTCUSD) | |
at 2013-12-01 03:06:51 +0900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'http' | |
require 'json' | |
require 'bitstamp' | |
require 'mtgox' | |
require 'btce' | |
# coinbase | |
coinbase_buy = HTTP.get "https://coinbase.com/api/v1/prices/buy", | |
:params => { :api_key => 'COINBASE_API_KEY', | |
:amount => "1.00", :currency => "USD"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='container'> | |
<div class='row'> | |
<div class='span12'> | |
<h2>Samurai Startup IslandのDayPassを購入してスタートアップライフを満喫しましょう!</h2> | |
<h4>価格: 2,100円</h4> | |
<form accept-charset="UTF-8" action="/tickets" class="new_ticket" id="new_ticket" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="xhANERJ85JA2nKY9esTc7hTIOQiLd6n0lrFn6QWqTmE=" /></div> | |
<label for="ticket_name">名前</label> | |
<input id="ticket_name" name="ticket[name]" size="30" type="text" /> | |
<label for="ticket_email">メールアドレス</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='container'> | |
<div class='row'> | |
<div class='span12'> | |
<h2>Samurai Startup IslandのDayPassを購入してスタートアップライフを満喫しましょう!</h2> | |
<h4>価格: 2,100円</h4> | |
<form accept-charset="UTF-8" action="/tickets" class="new_ticket" id="new_ticket" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="xhANERJ85JA2nKY9esTc7hTIOQiLd6n0lrFn6QWqTmE=" /></div> | |
<label for="ticket_name">名前</label> | |
<input id="ticket_name" name="ticket[name]" size="30" type="text" /> | |
<label for="ticket_email">メールアドレス</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl "https://api.webpay.jp/v1/plans" \ | |
-u "test_secret_key:" \ | |
-d "amount=1500" \ | |
-d "interval=week" \ | |
-d "name=すごいプラン" \ | |
-d "currency=jpy" \ | |
-d "id=great plan" \ | |
-d "interval_count=5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2013 Kei Kubo <[email protected]> (MIT License) | |
(function () { | |
var e = this; | |
this.Webpay = function () { | |
return e.endpoint = 'https://api.webpay.jp/v1', e.key = null, | |
e.setPublishableKey = function (key) { | |
e.key = key; | |
}, | |
e.setApiBase = function (endpoint) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require "stripe" | |
Stripe.api_key = "vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE" # this is a test key. change it to your API key | |
Stripe.api_base = "https://api.webpay.jp" | |
customer = Stripe::Customer.create( | |
:card => { | |
:number => "4242424242424242", | |
:exp_month => 1, | |
:exp_year => 2015, | |
:cvc => 123, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'net/https' | |
require 'uri' | |
require 'rubygems' | |
require 'json' | |
url = URI.parse('https://api.webpay.jp/v1/charges/ch_WO14ib0ANJiSHn') | |
req = Net::HTTP::Get.new(url.path) | |
req.basic_auth 'vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE', '' |
NewerOlder