payjp_app
PAY.JPを用いて、商品の購入することができます。また購入後の商品はSold Out!!とメッセージが表示されます。
(PAY.JPが提供するテストモードを用いて、クレジット決済機能を試験的に実装しています。)
https://user-images.githubusercontent.com/68714247/106376336-b8887080-63d7-11eb-9d3b-20fcab9688cf.mp4
erd.pdf
Column |
Type |
Options |
name |
string |
null: false |
email |
string |
null: false |
encrypted_password |
string |
null: false |
- has_one :card, dependent: :destroy
Column |
Type |
name |
string |
price |
integer |
Column |
Type |
Options |
card_token |
string |
null: false |
customer_token |
string |
null: false |
user_id |
references |
foreign_key: true |
Column |
Type |
Options |
item_id |
references |
foreign_key: true |
- ruby 2.6.5
- Rails 6.0.3.4
- MySQL
% git clone https://github.com/erika618/payjp_app.git
% cd payjp_app
% bundle install
% yarn install
% rails db:create
% rails db:migrate
https://pay.jp/
予めログインのうえ、公開鍵と秘密鍵を環境変数に設定しておく必要があります。
<!-- rubocop(インデントを整えるため) -->
% bundle exec rubocop -a