Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Stripe on Atmoph

Stripe payment on Atmoph View Strore

  • Sé el primero en comentar

Stripe on Atmoph

  1. 1. @atmophjp @bonar
  2. 2. CEO Software Engineer Kyohi Kang Kyohei Nakano Yoko Tarui Designer
  3. 3. View Store
  4. 4. Architecture
  5. 5. WebView VideoView • Widgets (Clock, Calendar …) • Menu • Settings • View Store • H.265 Video Native • Sensor Control • Remote Control • Background Task
  6. 6. Atmoph API (Ruby on Rails)HTTPS/JSON
  7. 7. Atmoph API (Ruby on Rails)HTTPS/JSON Stripe.js stripe gem
  8. 8. Register Card
  9. 9. Stripe API Post Card Number / HTTPS Return card token
  10. 10. 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
  11. 11. 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
  12. 12. Post Card Token / HTTPS Atmoph API
  13. 13. Payment
  14. 14. Post Purchase / HTTPS Atmoph API
  15. 15. Stripe API Post Card Token / HTTPS Response OK Atmoph API
  16. 16. 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
  17. 17. Stripe on Atmoph • クレジットカード情報が一度も Atmoph のサー バを通らずセキュア • シンプルで必要最低限のステップ • 言語のスタイルにあったバインディング
  18. 18. @atmophjp @bonar

×