package com.zioinfo.mall.gateway;

import java.math.BigDecimal;
import java.util.Map;

/** 결제 게이트웨이 추상화. 기본 mock, 운영 시 Stripe. */
public interface PaymentGateway {
    /**
     * 결제 승인.
     * @return { provider, txnId, status(APPROVED/DECLINED), cardMask }
     */
    Map<String, Object> charge(String orderNo, BigDecimal amount, String currency, String cardToken);

    /** 환불. @return { txnId, status(REFUNDED/FAILED) } */
    Map<String, Object> refund(String txnId, BigDecimal amount);

    String provider();
}
