Class: GlobalCollect::RequestModels::DoRefund::PaypalPayment

Inherits:
Payment
  • Object
show all
Defined in:
lib/global_collect/request_models/do_refund/paypal_payment.rb

Instance Attribute Summary

Attributes inherited from Base

#errors

Instance Method Summary collapse

Methods inherited from Payment

#suggested_response_mixins

Methods inherited from Base

#[], #[]=, #suggested_response_mixins, #validate

Constructor Details

#initialize(attributes) ⇒ PaypalPayment

Returns a new instance of PaypalPayment.



3
4
5
6
# File 'lib/global_collect/request_models/do_refund/paypal_payment.rb', line 3

def initialize(attributes)
  super(attributes)
  @attributes["PAYMENTPRODUCTID"] = "1040"
end

Instance Method Details

#fieldsObject

Merchant Guide for Paypal v6.1 states that we need to set PAYMENTPRODUCTID to ‘1040’ to refund a Paypal payment.



10
11
12
13
14
# File 'lib/global_collect/request_models/do_refund/paypal_payment.rb', line 10

def fields
  super.merge({
    "PAYMENTPRODUCTID" => ["N4",  "R"]
  })
end