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; /*from ww w . j a v a 2 s . c o m*/ import ru.yandex.money.api.enums.Status; import ru.yandex.money.api.response.util.ProcessPaymentError; import java.io.Serializable; import java.math.BigDecimal; /** * <p>??????? ???? ???????? ?????????? ?????? processPayment</p> * <b>????????</b>: ??? ??????????? ?????????? ???????? ???? ?????, ????? error ? * status (????? ??????? ??????????????), ????? null * @author dvmelnikov */ public class ProcessPaymentResponse implements Serializable { private static final long serialVersionUID = -7677898505314637271L; private Status status; private String error; private String errorDescription; private String paymentId; private BigDecimal balance; private String payer; private String payee; private BigDecimal creditAmount; private String invoiceId; private String pinSerial; private String pinSecret; private Boolean testPayment; private ProcessPaymentResponse() { } /** * ????? ?????????? ?? ??????? ??? ?????? ? ?????????? ???????? * @return ???? ??????? ??????????? ???????? */ public Boolean isSuccess() { return status == Status.success; } /** * @return ?????????? ??? ?????????? ??????????? ????????. * ????????? ?????????: * <ul> * <li>success - ????????? ?????????? (?????? ????????). ??? ???????? ???????????? ???????; </li> * <li>refused - ????? ? ?????????? ???????, ???????????? ??????? ?????? * ????????????? ? ???? error. ??? ???????? ???????????? ???????; </li> * <li>in_progress - ???????????? ??????? ??????????? ? ?????????? ???????????. * ?????????? ???????? ????????? ??????? ?? ???? ?? ??????????? ????????? ????????? ??????; * ???? ?????? ????????? - ???????????? ??????? ???????????. ?????????? * ???????? ????????? ??????? ?? ???? ?? ??????????? ????????? ????????? ??????.</li> * </ul> */ public Status getStatus() { return status; } /** * * @return ??? ?????? ??? ?????????? ???????. ?????????????? ?????? ??? ???????. * ????????? ?????????: * <ul> * <li>contract_not_found - ????????????? ????????????? ???????? ?? ???????? requestId;</li> * <li>not_enough_funds - ????????????? ????????? ?? ?????? ???????????;</li> * <li>limit_exceeded - ???????? ????? ?? ?????? ???????? ??? ?????? ???????? ?? * ?????? ??????? ???? ????????? ?????? ???????????. ?????????? ?????? * ?????????? ????????????????? ?????????? ????.</li> * <li>money_source_not_available - ??????????? ????? ??????? (money_source) * ??????????? ???? ??????? ???????.</li> * <li>illegal_param_csc - ????????????? ??? ??????? ????????????? ???????? ????????? csc; * payment_refused - ??????? ?? ?????-???? ??????? ??????? ? ?????? ???????;</li> * <li>authorization_reject - ? ??????????? ??????? ????????. ?????? ????? ?????????? * ?????, ???? ????-???????? ???????? ?????????? ?? ?????, * ???? ???????? ????? ????????? ????????? ???? ??????? ?????????????.</li> * </ul> */ public ProcessPaymentError getError() { return ProcessPaymentError.getByCode(error); } /** * @return ?????????? ????????????? ???????????? ???????. * ?????????????? ?????? ??? ????????? ?????????? ??????. */ public String getPaymentId() { return paymentId; } /** * @return ?????????? ???????? ?? ?????? ????????????? ?????? * ??????????? ???????. ?????????????? ?????? ??? ????????? ?????????? ??????. */ public BigDecimal getBalance() { return balance; } /** * @return ?????????? ????? ?????? ???????????. ?????????????? * ?????? ??? ????????? ?????????? ??????. */ public String getPayer() { return payer; } /** * @return ?????????? ????? ?????? ???????????. ?????????????? * ?????? ??? ????????? ?????????? ??????. */ public String getPayee() { return payee; } /** * @return ?????????? ??????, ?????????? ?? ????? ???????????. * ?????????????? ??? ????????? ???????? ????????? ?? ????? ??????? * ????????????? ?????????. */ public BigDecimal getCreditAmount() { return creditAmount; } public String getErrorDescription() { return errorDescription; } public Boolean isTestPayment() { return testPayment; } /** * @return ?????? ?????????? ???????? ? ???????.???????. * ?????????????? ??? ????????? ?????????? ??????? ? ???????. */ public String getInvoiceId() { return invoiceId; } /** * ???????? ????? (????????? ??????) ????-????. * ?????????????? ??? ????????? ?????????? ??????? ? ???????, ????????? ????-????. * * ???????????? ????? ??????? ??????? ????? ????? ? ???????? ??????? ?? ??????? ???????.??????. * * @return ???????? ????? ????-????. */ public String getPinSerial() { return pinSerial; } /** * ?????? (????????? ??????) ????-????. * ?????????????? ??? ????????? ?????????? ??????? ? ???????, ????????? ????-???? * * ???????????? ????? ??????? ??????? ????? ???? ? ???????? ??????? ?? ??????? ???????.??????. * @return ????-??? */ public String getPinSecret() { return pinSecret; } @Override public String toString() { return "ProcessPaymentResponse{" + "status=" + status + ", error=" + error + ", error_description='" + errorDescription + '\'' + ", paymentId='" + paymentId + '\'' + ", balance=" + balance + ", payer='" + payer + '\'' + ", payee='" + payee + '\'' + ", creditAmount=" + creditAmount + ", invoice_id=" + invoiceId + ", pin_serial=" + pinSerial + ", test_payment=" + testPayment + '}'; } }