diadia

興味があることをやってみる。自分のメモを残しておきます。

2019-01-26から1日間の記事一覧

django stripe 支払い請求をする

stripeの使い方イメージ まずお客さんのカード情報をstripeにcheckout.jsまたはelementを使って送信する。するとそのお客さんのトークンが発行される。このトークンを使って支払い請求するようだ。それが以下のコードになる。でこのコードはサーバーサイドに…

Django stripe カード情報を登録する

stripeソースurl https://stripe.com/docs/api/cards/create?lang=python メモ import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" customer = stripe.Customer.retrieve("cus_EPPm06zGJs6haY") customer.sources.create(source="tok_maste…