Exemplo n.º 1
0
        internal PayPalTransactionResponse(PayPalAccount usedAccount, PayoutBatch response)
        {
            RawResponse     = response.ToString();
            UsedAccount     = usedAccount;
            Note            = string.Empty;
            ReferenceNumber = response.batch_header.payout_batch_id;

            bool IsFail = response.batch_header.batch_status == "DENIED" ||
                          response.batch_header.batch_status == "CANCELED";

            IsSuccess = !IsFail;

            if (IsFail)
            {
                Note = response.batch_header.batch_status;
            }
            else
            {
                Note = Resources.U4000.MONEYSENT.Replace("%p%", "PayPal");
            }
        }