Skip to content

Commit 5084774

Browse files
committed
카드 번호 결제 및 가상계좌 발급 요청 예제 추가
1 parent 038e6c6 commit 5084774

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ use Getsolaris\LaravelTossPayments\Attributes\Payment;
102102

103103
$payment = TossPayments::for(Payment::class)
104104
->paymentKey($paymentKey)
105+
->cancelReason('고객 변심')
105106
->cancel(
106-
cancelReason: '고객 변심',
107107
refundReceiveAccount: new RefundReceiveAccount(
108108
bank: '11',
109109
accountNumber: '111111111111',
@@ -114,6 +114,47 @@ $payment = TossPayments::for(Payment::class)
114114
return $payment->json();
115115
```
116116

117+
### [카드 번호 결제](https://docs.tosspayments.com/reference#%EC%B9%B4%EB%93%9C-%EB%B2%88%ED%98%B8-%EA%B2%B0%EC%A0%9C)
118+
119+
POST /v1/payments/key-in
120+
121+
```php
122+
use Getsolaris\LaravelTossPayments\TossPayments;
123+
use Getsolaris\LaravelTossPayments\Attributes\Payment;
124+
125+
$keyIn = TossPayments::for(Payment::class)
126+
->amount($amount)
127+
->orderId($orderId)
128+
->orderName($orderName)
129+
->cardNumber($cardNumber)
130+
->cardExpirationYear($cardExpirationYear)
131+
->cardExpirationMonth($cardExpirationMonth)
132+
->customerIdentityNumber($customerIdentityNumber)
133+
->keyIn();
134+
135+
return $keyIn->json();
136+
```
137+
138+
139+
### [가상계좌 발급 요청](https://docs.tosspayments.com/reference#%EA%B0%80%EC%83%81%EA%B3%84%EC%A2%8C-%EB%B0%9C%EA%B8%89-%EC%9A%94%EC%B2%AD)
140+
141+
POST /v1/virtual-accounts
142+
143+
```php
144+
use Getsolaris\LaravelTossPayments\TossPayments;
145+
use Getsolaris\LaravelTossPayments\Attributes\Payment;
146+
147+
$virtualAccounts = TossPayments::for(Payment::class)
148+
->amount($amount)
149+
->orderId($orderId)
150+
->orderName($orderName)
151+
->customerName($customerName)
152+
->bank('우리')
153+
->virtualAccounts();
154+
155+
return $virtualAccounts->json();
156+
```
157+
117158
## [거래 (Transaction)](https://docs.tosspayments.com/reference#%EA%B1%B0%EB%9E%98)
118159

119160
### [거래 조회](https://docs.tosspayments.com/reference#%EA%B1%B0%EB%9E%98-%EC%A1%B0%ED%9A%8C)

0 commit comments

Comments
 (0)