Skip to content

v1.0

Compare
Choose a tag to compare
@getsolaris getsolaris released this 01 Nov 14:07
· 79 commits to main since this release

Laravel Toss Payments v1.0

세부 기능이 점차 추가될 예정입니다.

  • 결제 (Payments)
    • 결제 승인 (confirm)
use Getsolaris\LaravelTossPayments\TossPayments;
use Getsolaris\LaravelTossPayments\Attributes\Payment;

$payment = TossPayments::for(Payment::class)
    ->paymentKey($paymentKey)
    ->orderId($orderId)
    ->amount($amount)
    ->confirm();

return $payment->json();
  • 거래 (Transaction)
    • 조회 (get)
use Getsolaris\LaravelTossPayments\TossPayments;
use Getsolaris\LaravelTossPayments\Attributes\Transaction;

$transactions = TossPayments::for(Transaction::class)
    ->startDate('2022-01-01')
    ->endDate('2022-12-31')
    ->get();

return $transactions->json();
  • 테스트 코드 사용하기
use Getsolaris\LaravelTossPayments\TossPayments;
use Getsolaris\LaravelTossPayments\Attributes\Transaction;

$transactions = TossPayments::for(Transaction::class)
    ->startDate('2022-01-01T00:00:00')
    ->endDate('2022-12-31T00:00:00')
    ->testCode('INVALID_CARD_EXPIRATION')
    ->get();