Back to project page Java-Yandex.Money-API-SDK.
The source code is released under:
MIT License
If you think the Android project Java-Yandex.Money-API-SDK listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ru.yandex.money.api.response.util; /* w ww. j a v a 2 s.com*/ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.util.HashMap; import java.util.Map; /** * <p/> * <p/> * Created: 27.11.13 0:29 * <p/> * * @author OneHalf */ public enum RequestPaymentError implements PaymentErrorCode { /** * ?????????????? ????????? ?? ??????. * ??????? ?????? ??????????????? ?? request-payment ?????? ???? p2p ?????????. * ? ?????????? ????????? ?????? ??????????? ?? process-payment */ NOT_ENOUGH_FUNDS("not_enough_funds"), /** * ???????? ????? ????????. ??? ????? ???? ????? ?????? ?? ??????, * ????? ????? ????????????? ???????.????? (?????? ?????? ?????? ???????? ?? ????????????????????? ????????????) * ??? request-payment ??????????????? ?????? ???? p2p ????????? */ LIMIT_EXCEEDED("limit_exceeded"), /** * ???????? ????????????. ?????? ????????? ????????????? ?? url ?? ????? "account_unblock_uri" */ ACCOUNT_BLOCKED("account_blocked"), /** * ? ??????????? ??????? ????????. ????????? ???????: * <ul> * <li>??????????? ?? ???????? ??????????? ????????? ???? ??????? ?????????????;</li> * <li>???????????? ?? ??????? ?????????? ?? ?????????????? ????????? ???????.??????.</li> * </ul> */ AUTHORIZATION_REJECT("authorization_reject"), /** * ??????? ??????? ? ?????????? ???????. * (?????????, ?????? ??? ?? ???????) */ PAYMENT_REFUSED("payment_refused"), /** * ????????????? ????????? ??????? ????????????? ??? ????? ????????????? ?????????. */ ILLEGAL_PARAMS("illegal_params"), /** * ?????????????? ???????? ????????? label. * (????? ????????? ??????????????, ?? ?????? ???? ?? ??????? ? ?? ?????????? ?????? 64-? ?????????) */ ILLEGAL_PARAM_LABEL("illegal_param_label"), /** * ??? p2p ???????? ?? ????????????? ?????? ???????? ?????? ????? ???????? ?? ??????????? * ??? ??????? ????????????? ??? ??????????? ???????. */ PHONE_UNKNOWN("phone_unknown"), /** * ??????????? ????????? ????????????? ?? uri, ????????? ? ???? ext_action_uri. * ?????? ?????? ?????? ???????????? ??????? ????????? ??????????? ??????. * * ??? ??????? ?????? ?????? ??????????????? ?????? ??? p2p-???????? ??? ??? ??????? ? ???????-?????????? ??, * ? ???????, ????? ?????????? ?? ????????? ????? ????????????? ?????? ?? ?????? ???????.????? */ EXT_ACTION_REQUIRED("ext_action_required"), /** * ?????? ?????? */ TECHNICAL_ERROR("technical_error"); private final String code; private static final Log LOG = LogFactory.getLog(RequestPaymentError.class); private static Map<String,RequestPaymentError> map; static { map = new HashMap<String, RequestPaymentError>(); for (RequestPaymentError error : values()) { map.put(error.code, error); } } public static RequestPaymentError getByCode(String code) { if (code == null) { return null; } RequestPaymentError error = map.get(code); if (error != null) { return error; } // ????? ????????? ???? ??????, ????????? ??????? ????? ??????? ?????????? ?? github LOG.error("unknown error code: " + code); return TECHNICAL_ERROR; } RequestPaymentError(String code) { this.code = code; } @Override public String getCode() { return code; } }