Currency Shop

개요

A currency shop lined with coin packs. Press Buy on a product under Buy coins; the purchase goes through with a test receipt and the coins land in the wallet shown under Your coins. The products, prices and amounts are a GS2-Showcase shelf, and each purchase runs GS2-Money2 receipt verification and the deposit as one transaction.

체험 방법

  1. Under Your coins, note the current Free balance, Paid balance and Total balance.
  2. Buy coins lists three products: 10 coins, 50 coins and 250 coins (priced 1, 2 and 3 in the demo currency XXX).
  3. Press Buy on any product; the purchase runs with a test store receipt and the page says “Purchased.”
  4. Paid balance and Total balance under Your coins go up by the coins in the pack you bought.

The receipts in this demo come from the platform’s test store; no real payment takes place.

사용하는 GS2 서비스

  • GS2-Showcase: A GS2-Showcase shelf per currency type (JPY / USD / XXX) defines the coin packs with their prices and amounts, and takes the purchase.
  • GS2-Money2: On purchase GS2-Money2 verifies the store receipt (the demo namespace accepts test receipts) and deposits the coins into the wallet as paid currency.

GS2 Studio에서 사용하기

GS2 Studio의 Simple 모드에서 Add features 를 열고 Currency Shop 의 Add 를 누르면 이 기능을 자신의 프로젝트에 가져올 수 있습니다. 패키지를 직접 지정하려면 Add from GitHub 를 선택하고 아래 패키지를 입력합니다.

https://github.com/gs2io/gs2-studio-package/tree/main/micro-shop-currency/packages/micro-shop-currency
  • Owner: gs2io
  • Repository: gs2-studio-package
  • Subdirectory: micro-shop-currency/packages/micro-shop-currency

소스 코드