diff --git a/README.md b/README.md index ca883bf..7911dc6 100644 --- a/README.md +++ b/README.md @@ -140,13 +140,6 @@ fmt.Println("resend scheduled for %d notifications", res.Count) httpResp, err := client.PostRequest(&myCouponUpgradeRequest{PaymentID: "3293", Coupon: "whatever"}) ``` -- `tinkoff.IsRefundableStatus(s)` allows you to check if the payment can be refunded according to policies provided by Tinkoff API doc: - ```go - if !tinkoff.IsRefundableStatus(payment.Status) { - return errors.New("payment can't be refunded") - } - ``` - ## References The code in this repo based on some code from [koorgoo/tinkoff](https://github.com/koorgoo/tinkoff). Differences: - Support for API v2 diff --git a/status.go b/status.go index 832843b..9ad6891 100644 --- a/status.go +++ b/status.go @@ -20,13 +20,3 @@ const ( StatusPartialRefunded = "PARTIAL_REFUNDED" // Возвращен частично StatusRefunded = "REFUNDED" // Возвращен полностью ) - -func IsRefundableStatus(status string) bool { - switch status { - case StatusNew, - StatusAuthorized, - StatusConfirmed: - return true - } - return false -}