Sha256: 84fb9ac2ccafdf45b892c7bb8560ad03a4a275b0407f6eb69a266e37a54e36f3

Contents?: true

Size: 526 Bytes

Versions: 4

Compression:

Stored size: 526 Bytes

Contents

module PayPal
  module Recurring
    module Response
      class Payment < Base
        mapping(
          :status    => :PAYMENTINFO_0_PAYMENTSTATUS,
          :amount    => :PAYMENTINFO_0_AMT,
          :fees      => :PAYMENTINFO_0_FEEAMT,
          :seller_id => :PAYMENTINFO_0_SECUREMERCHANTACCOUNTID
        )

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
paypal-recurring-0.1.3 lib/paypal/recurring/response/payment.rb
paypal-recurring-0.1.2 lib/paypal/recurring/response/payment.rb
paypal-recurring-0.1.1 lib/paypal/recurring/response/payment.rb
paypal-recurring-0.1.0 lib/paypal/recurring/response/payment.rb