-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
151 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
# Ruby on Rails Project | ||
|
||
## 기본설명 | ||
``` | ||
Ruby on Rails 환경을 먼저 준비 해주세요. | ||
패키지 종속성 관리를 위해 Gemfile 을 활용 했어요. | ||
* HTTParty 를 추가 했어요. | ||
기존에 운영하시던 프로젝트에 적용하실때 참조하실 수 있도록, | ||
* 결제 샘플은 분리된 app 인 payments 를 추가 하였어요. | ||
** app/controllers 에 추가된 app 이름으로 생성된 {{project_name}}_controller.rb | ||
** app/views 내 HTML 템플릿 | ||
** config/routes.rb 에 설정된 route 를 확인 해주세요. | ||
샘플에는 CSS 를 적용해두었어요. | ||
* asset/stylesheet 에 css 파일 추가 | ||
* config/initializers/asset.rb 에 precompile 부분 아래 내용 추가 | ||
** Rails.application.config.assets.precompile += %w( bulma.min.css ) | ||
``` | ||
# payment-keyin-api/rubyonrails | ||
|
||
Ruby on Rails를 이용한 카드 번호 결제 샘플 코드입니다. | ||
|
||
## 준비하기 | ||
|
||
Ruby on Rails 환경을 먼저 준비해주세요. | ||
|
||
## 실행하기 | ||
|
||
1. `/app/controllers/payment_controller.rb` 파일에 테스트하고 싶은 `paymentKey`, `secretKey`를 넣으세요. | ||
|
||
2. `/app` 폴더와 아래 기본 설명을 참조해서 기존 프로젝트에 샘플 코드를 추가하세요. | ||
|
||
## 기본 설명 | ||
|
||
Gemfile로 패키지 종속성을 관리해요. | ||
|
||
- HTTParty 를 추가 했어요. | ||
|
||
결제 샘플은 분리된 payments app에 있어요. | ||
|
||
- app/controllers 에 추가된 app 이름으로 생성된 {{project_name}}\_controller.rb | ||
- app/views 내 HTML 템플릿 | ||
- config/routes.rb 에 설정된 route 를 확인 해주세요. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# payment-virtualaccount-api/asp | ||
|
||
ASP를 이용한 가상계좌 발급 샘플 코드입니다. | ||
|
||
## 준비하기 | ||
|
||
로컬에 IIS를 설치하고 ASP 관련 설정을 완료하세요. | ||
|
||
## 실행하기 | ||
|
||
1. `/asp/virtual_account.asp` 파일에서 테스트하고 싶은 `paymentKey`, `secretKey`를 넣으세요. | ||
|
||
2. `/asp` 샘플을 `inetpub/wwwroot`에 복사하고 실행하면 샘플 코드를 http://127.0.0.1/virtual_account.asp 주소에서 테스트 가능합니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
# Python - Django Project | ||
# payment-virtualaccount-api/django | ||
|
||
## 기본설명 | ||
``` | ||
Python - Django 환경을 먼저 준비 해주세요. | ||
Django를 이용한 가상계좌 발급 샘플 코드입니다. | ||
|
||
## 준비하기 | ||
|
||
[Python](https://www.python.org/downloads/), [Django](https://www.djangoproject.com/download/), [pip](https://pip.pypa.io/en/stable/installation/)를 설치하세요. | ||
|
||
## 실행하기 | ||
|
||
1. `/payments/views.py` 파일에 테스트하고 싶은 `paymentKey`, `secretKey`를 넣으세요. | ||
|
||
2. `/payments` 앱과 아래 설명을 참조해서 기존 프로젝트에 샘플 코드를 추가하세요. | ||
|
||
## 기본 설명 | ||
|
||
패키지 종속성 관리를 위해 requirements.txt 를 활용 했어요. | ||
|
||
기존에 운영하시던 프로젝트에 적용하실때 참조하실 수 있도록, | ||
* 프로젝트 메인페이지는 분리된 app 인 main_page 에 | ||
* 결제 샘플은 분리된 app 인 payments 에 위치 시켰어요. | ||
** 프로젝트 settings.py, urls.py 에서 app 설정을 확인 해주세요. | ||
결제 샘플 app 인 payments 를 참조해서, | ||
프로젝트에서 원하시는 이름의 app을 추가하신 이후에 templates/payments, urls.py, views.py 를 붙여넣기 해주세요. | ||
샘플에는 CSS 를 적용해두었어요. | ||
* static/payments 내에 CSS 폴더/파일을 추가 하였어요. | ||
* html 내에 아래와 같이 CSS 추가 적용 하였어요. | ||
** {% load static %} | ||
** <link rel="stylesheet" type="text/css" href="{% static 'payments/bulma/bulma.min.css' %}"/> | ||
``` | ||
|
||
- 프로젝트 메인페이지는 분리된 app 인 main_page 에 | ||
- 결제 샘플은 분리된 app 인 payments 에 위치 시켰어요. | ||
- 프로젝트 settings.py, urls.py 에서 app 설정을 확인 해주세요. | ||
|
||
결제 샘플 `app/payments`를 참조해서, 프로젝트 앱에 templates/payments, urls.py, views.py 를 붙여넣기 해주세요. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
# payment-window/go | ||
# payment-virtualaccount-api/go | ||
|
||
Go 를 이용한 결제창 샘플입니다. | ||
Go를 이용한 가상계좌 발급 샘플 코드입니다. | ||
|
||
## 준비하기 | ||
|
||
Go 공식 웹사이트인 https://go.dev/dl/ 에서 해당 OS 버전의 Go 를 다운로드하여 설치 합니다. | ||
|
||
## 테스트 방법 | ||
<br> | ||
- 설치 및 환경 구성 참고 링크 주소 | ||
> http://golang.site/go/article/2-Go-%EC%84%A4%EC%B9%98%EC%99%80-Go-%ED%8E%B8%EC%A7%91%EA%B8%B0-%EC%86%8C%EA%B0%9C | ||
### 설치 | ||
Go 공식 웹사이트인 https://go.dev/dl/ 에서 해당 OS 버전의 Go 를 다운로드하여 설치 합니다. | ||
## 실행하기 | ||
|
||
* 설치 및 환경 구성 참고 링크 주소 | ||
> http://golang.site/go/article/2-Go-%EC%84%A4%EC%B9%98%EC%99%80-Go-%ED%8E%B8%EC%A7%91%EA%B8%B0-%EC%86%8C%EA%B0%9C | ||
<br> | ||
1. `virtual-account.go` 파일에 테스트하고 싶은 `paymentKey`, `secretKey`를 넣으세요. | ||
|
||
### 실행 | ||
샘플 소스의 기본 포트는 9090 으로 되어 있습니다. | ||
다음과 같이 go 명령어를 통해 서버를 구동 합니다. | ||
2. go 서버를 실행합니다. | ||
|
||
```> go run virtual-account.go ``` | ||
```sh | ||
$ > go run virtual-account.go # 서버 실행 | ||
``` | ||
|
||
브라우저에서 http://localhost:9090 를 호출하면 가상계좌 발급 API를 요청하고 응답값이 리턴 됩니다. | ||
3. http://localhost:9090 에서 샘플 프로젝트를 확인하세요. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# payment-virtualaccount-api/jsp | ||
|
||
JSP를 이용한 가상계좌 발급 샘플 코드입니다. | ||
|
||
## 준비하기 | ||
|
||
- [Java](https://www.oracle.com/kr/java/technologies/downloads/) | ||
- [Apache Tomcat](https://tomcat.apache.org/download-90.cgi) | ||
|
||
## 실행하기 | ||
|
||
1. `/payment-virtualaccount-api/jsp` 폴더를 Tomcat의 `webapp` 폴더에 넣어주세요. | ||
|
||
2. `/virtual_account.jsp` 파일에 테스트하고 싶은 `paymentKey`, `secretKey`를 넣으세요. | ||
|
||
3. Tomcat을 실행하고 http://localhost:{PORT_NUMBER}/jsp/virtual_account.jsp 에서 샘플 프로젝트를 확인하세요. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
# payment-virtualaccount-api/node | ||
|
||
Node.js 를 이용한 결제창 샘플입니다. Express로 구성되었습니다. | ||
Node.js 를 이용한 가상계좌 발급 샘플 코드입니다. Express로 구성되었습니다. | ||
|
||
## 실행 요구조건 | ||
## 준비하기 | ||
|
||
- Node.js >= 14.0.0 | ||
- npm | ||
|
||
## 테스트하기 | ||
|
||
샘플소스를 copy하신후 | ||
샘플 프로젝트를 사용하려면 [Node.js](https://nodejs.org/ko/) 14.0.0 이상의 버전이 필요합니다. 먼저 내 컴퓨터의 Node.js 버전을 확인하세요. | ||
|
||
```sh | ||
$ npm install | ||
$ node app.js | ||
$ node -v | ||
$ v16.15.1 | ||
``` | ||
|
||
서버가 실행 된 후, `http://localhost:8080/virtual_account/`으로 접속해서 테스트할 수 있습니다. | ||
## 실행하기 | ||
|
||
1. `/routes/index.js` 파일에 테스트하고 싶은 `paymentKey`, `secretKey`를 넣으세요. | ||
|
||
2. 의존성 패키지를 다운로드하고 서버를 실행합니다. | ||
|
||
```sh | ||
$ npm install # 의존성 패키지 다운로드 | ||
$ node app.js # 서버 실행 | ||
``` | ||
|
||
* 돌아온 결과 값에서 `virtualAccount.accountNumber`, `virtualAccount.bank`으로 입금해야 할 가상계좌 정보를 결제 고객에게 알려주세요. | ||
3. 서버가 실행 된 후, `http://localhost:8080/virtual_account`으로 접속해서 테스트할 수 있습니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# payment-virtualaccount-api/php | ||
|
||
PHP를 이용한 결제 취소 샘플 코드입니다. | ||
|
||
## 준비하기 | ||
|
||
환경에 맞춰 [php를 설치하세요](https://www.php.net/manual/en/install.php). | ||
|
||
``` | ||
brew install php | ||
``` | ||
|
||
## 실행하기 | ||
|
||
1. `cancel.php` 파일에 테스트하고 싶은 `paymentKey`, `secretKey`를 넣으세요. | ||
|
||
2. php 서버를 실행합니다. | ||
|
||
```sh | ||
$ php -S localhost:4242 # 서버 실행 | ||
``` | ||
|
||
3. http://localhost:4242/cancel.php 에서 샘플 프로젝트를 확인하세요. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
# Ruby on Rails Project | ||
|
||
## 기본설명 | ||
``` | ||
Ruby on Rails 환경을 먼저 준비 해주세요. | ||
패키지 종속성 관리를 위해 Gemfile 을 활용 했어요. | ||
* HTTParty 를 추가 했어요. | ||
기존에 운영하시던 프로젝트에 적용하실때 참조하실 수 있도록, | ||
* 결제 샘플은 분리된 app 인 payments 를 추가 하였어요. | ||
** app/controllers 에 추가된 app 이름으로 생성된 {{project_name}}_controller.rb | ||
** app/views 내 HTML 템플릿 | ||
** config/routes.rb 에 설정된 route 를 확인 해주세요. | ||
샘플에는 CSS 를 적용해두었어요. | ||
* asset/stylesheet 에 css 파일 추가 | ||
* config/initializers/asset.rb 에 precompile 부분 아래 내용 추가 | ||
** Rails.application.config.assets.precompile += %w( bulma.min.css ) | ||
``` | ||
# payment-virtualaccount-api/rubyonrails | ||
|
||
Ruby on Rails를 이용한 가상계좌 발급 샘플 코드입니다. | ||
|
||
## 준비하기 | ||
|
||
Ruby on Rails 환경을 먼저 준비해주세요. | ||
|
||
## 실행하기 | ||
|
||
1. `/app/controllers/payment_controller.rb` 파일에 테스트하고 싶은 `paymentKey`, `secretKey`를 넣으세요. | ||
|
||
2. `/app` 폴더와 아래 기본 설명을 참조해서 기존 프로젝트에 샘플 코드를 추가하세요. | ||
|
||
## 기본 설명 | ||
|
||
Gemfile로 패키지 종속성을 관리해요. | ||
|
||
- HTTParty 를 추가 했어요. | ||
|
||
결제 샘플은 분리된 payments app에 있어요. | ||
|
||
- app/controllers 에 추가된 app 이름으로 생성된 {{project_name}}\_controller.rb | ||
- app/views 내 HTML 템플릿 | ||
- config/routes.rb 에 설정된 route 를 확인 해주세요. |