Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.46 KB

CASHRECEIPT.md

File metadata and controls

50 lines (35 loc) · 1.46 KB

POST /v1/cash-receipts

use Getsolaris\LaravelTossPayments\TossPayments;
use Getsolaris\LaravelTossPayments\Attributes\CashReceipt;

$cashReceipt = TossPayments::for(CashReceipt::class)
    ->amount($amount)
    ->orderId($orderId)
    ->orderName($orderName)
    ->customerIdentityNumber($customerIdentityNumber)
    ->type($type)
    ->request();

return $cashReceipt->json();

POST /v1/cash-receipts/{receiptKey}/cancel

use Getsolaris\LaravelTossPayments\TossPayments;
use Getsolaris\LaravelTossPayments\Attributes\CashReceipt;

$cashReceipt = TossPayments::for(CashReceipt::class)
    ->receiptKey($receiptKey)
    ->cancel();

return $cashReceipt->json();

GET /v1/cash-receipts

use Getsolaris\LaravelTossPayments\TossPayments;
use Getsolaris\LaravelTossPayments\Attributes\CashReceipt;

$cashReceipts = TossPayments::for(CashReceipt::class)
    ->requestDate($requestDate)
    ->get();

return $cashReceipts->json();