Class: PayPal::SDK::AdaptivePayments::API
- Inherits:
-
Core::API::Platform
- Object
- Core::API::Platform
- PayPal::SDK::AdaptivePayments::API
- Defined in:
- lib/paypal-sdk/adaptive_payments/api.rb
Constant Summary collapse
- ADAPTIVE_PAYMENTS_HTTP_HEADER =
{ "X-PAYPAL-REQUEST-SOURCE" => "adaptivepayments-ruby-sdk-#{VERSION}" }
Constants included from Urls
Instance Method Summary collapse
- #default_http_header ⇒ Object
-
#initialize(environment = nil, options = {}) ⇒ API
constructor
A new instance of API.
-
#ipn_valid?(raw_post_data) ⇒ Boolean
Validate IPN message.
Methods included from Urls
#payment_url, #preapproval_url, #redirect_url
Methods included from Services
#BuildCancelPreapproval, #BuildConfirmPreapproval, #BuildConvertCurrency, #BuildExecutePayment, #BuildGetAllowedFundingSources, #BuildGetAvailableShippingAddresses, #BuildGetFundingPlans, #BuildGetPaymentOptions, #BuildGetPrePaymentDisclosure, #BuildGetShippingAddresses, #BuildGetUserLimits, #BuildPay, #BuildPaymentDetails, #BuildPreapproval, #BuildPreapprovalDetails, #BuildRefund, #BuildSetPaymentOptions, #CancelPreapproval, #ConfirmPreapproval, #ConvertCurrency, #ExecutePayment, #GetAllowedFundingSources, #GetAvailableShippingAddresses, #GetFundingPlans, #GetPaymentOptions, #GetPrePaymentDisclosure, #GetShippingAddresses, #GetUserLimits, #Pay, #PaymentDetails, #Preapproval, #PreapprovalDetails, #Refund, #SetPaymentOptions
Constructor Details
#initialize(environment = nil, options = {}) ⇒ API
Returns a new instance of API.
10 11 12 |
# File 'lib/paypal-sdk/adaptive_payments/api.rb', line 10 def initialize(environment = nil, = {}) super(SERVICE_NAME, environment, ) end |
Instance Method Details
#default_http_header ⇒ Object
15 16 17 |
# File 'lib/paypal-sdk/adaptive_payments/api.rb', line 15 def default_http_header super.merge(ADAPTIVE_PAYMENTS_HTTP_HEADER) end |
#ipn_valid?(raw_post_data) ⇒ Boolean
Validate IPN message
20 21 22 |
# File 'lib/paypal-sdk/adaptive_payments/api.rb', line 20 def ipn_valid?(raw_post_data) Core::API::IPN.valid?(raw_post_data, config) end |