Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

1

Share

Download to read offline

Stripe on Atmoph

Download to read offline

Stripe payment on Atmoph View Strore

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

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
  • yasuhikotoku

    Jun. 12, 2017

Stripe payment on Atmoph View Strore

Views

Total views

155

On Slideshare

0

From embeds

0

Number of embeds

1

Actions

Downloads

0

Shares

0

Comments

0

Likes

1

×