<?php

namespace Kylin\Payment\Contracts;

/**
 * 支付网关接口
 */
interface GatewayInterface
{
    /**
     * 发起支付
     */
    public function pay(array $params): mixed;

    /**
     * 查询订单
     */
    public function query(string $orderNo): mixed;

    /**
     * 退款
     */
    public function refund(array $params): mixed;

    /**
     * 关闭订单
     */
    public function close(string $orderNo): mixed;

    /**
     * 回调处理
     */
    public function callback(array $data): mixed;

    /**
     * 设置沙盒模式
     */
    public function setSandbox(bool $sandbox): self;

    /**
     * 获取沙盒模式状态
     */
    public function getSandbox(): bool;
}
