@atmophjp
@bonar
CEO Software Engineer
Kyohi Kang Kyohei Nakano Yoko Tarui
Designer
View Store
Architecture
WebView
VideoView
• Widgets (Clock, Calendar …)
• Menu
• Settings
• View Store
• H.265 Video
Native
• Sensor Control
• Remote Control
• Background Task
Atmoph API
(Ruby on Rails)HTTPS/JSON
Atmoph API
(Ruby on Rails)HTTPS/JSON
Stripe.js stripe gem
Register Card
Stripe API
Post Card Number / HTTPS
Return card token
function verifyCardInfo() {
if (!window.Stripe.card.validateCardNumber($scope.card_number)) {
return ErrorLocal.P70;
}
if (!window.Stripe.card.validateExpiry(
$scope.exp_month, $scope.exp_year)) {
return ErrorLocal.P71;
}
if (!window.Stripe.card.validateCVC($scope.security_code)) {
return ErrorLocal.P72;
}
.....
}
Offline validation
window.Stripe.card.createToken({
number: $scope.card_number,
exp_month: $scope.exp_month,
exp_year: $scope.exp_year,
cvc: $scope.security_code
}, function responseHander(status, response) {
if (response.error) {
ErrorDialog.show(response);
return;
}
....
});
Create token
Post Card Token / HTTPS
Atmoph API
Payment
Post Purchase / HTTPS
Atmoph API
Stripe API
Post Card Token / HTTPS
Response OK
Atmoph API
customer = Stripe::Customer.create({
:description => user.stripe_name,
:email => user.email
}, SECRET_AUTH_INFO)
token_id = params[:token_id]
card = customer.sources.create(:source => token_id)
customer.default_source = card["id"]
customer.save
charge = Stripe::Charge.create({
:amount => price.value,
:currency => currency.name,
:customer => customer,
:description => "....."
}, SECRET_AUTH_INFO)
Create charge
Stripe on Atmoph
• クレジットカード情報が一度も Atmoph のサー
バを通らずセキュア
• シンプルで必要最低限のステップ
• 言語のスタイルにあったバインディング
@atmophjp
@bonar

Stripe on Atmoph