Sha256: 4cae5aea7c74d0aa3c19c8bf924e343d74b4b5392895536516729cac7d66baae

Contents?: true

Size: 707 Bytes

Versions: 3

Compression:

Stored size: 707 Bytes

Contents

module PayPal
  module Recurring
    module Response
      class Payment < Base
        mapping(
          :status         => :PAYMENTINFO_0_PAYMENTSTATUS,
          :amount         => :PAYMENTINFO_0_AMT,
          :fees           => :PAYMENTINFO_0_FEEAMT,
          :transaction_id => :PAYMENTINFO_0_TRANSACTIONID,
          :seller_id      => :PAYMENTINFO_0_SECUREMERCHANTACCOUNTID,
          :reference      => [:PROFILEREFERENCE, :PAYMENTREQUEST_0_CUSTOM, :PAYMENTREQUEST_0_INVNUM]
        )

        def completed?
          params[:PAYMENTINFO_0_PAYMENTSTATUS] == "Completed"
        end

        def approved?
          params[:PAYMENTINFO_0_ACK] == "Success"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
didil-paypal-recurring-1.1.1 lib/paypal/recurring/response/payment.rb
paypal-recurring-1.1.0 lib/paypal/recurring/response/payment.rb
paypal-recurring-1.0.0 lib/paypal/recurring/response/payment.rb