Class: MastercardMerchantCheckout::Api::PaymentDataApi

Inherits:
Object
  • Object
show all
Includes:
MastercardCoreSdk::Client, MastercardCoreSdk::Core, MastercardCoreSdk::Exceptions, Tracker
Defined in:
lib/mastercard_merchant_checkout/api/payment_data_api.rb

Class Method Summary collapse

Class Method Details

.show(transaction_id, query_params, api_config = nil) ⇒ PaymentData

PaymentData Service Use this service to retrieve the consumer’s payment card, and shipping details from Masterpass. New or existing Brazil merchants looking for the house number and street name as separate fields should leverage these two additional extension points in their Masterpass checkout integration. Line 4 will provide the house number and line 5 will provide the street name. Brazil merchants should first look for data in lines 4 and 5, and in the case that no data is found there, merchants should then look for data in line 1. API URL: /masterpass/paymentdata/:transaction_id

Parameters:

  • transaction_id

    Identifies the transaction for which to return the consumer’s payment data. This is the oauth_verifier value sent by Masterpass in the callback URL after the Masterpass UI is closed.

  • query_params

    The query parameters.

  • api_config (defaults to: nil)

    Optional ApiConfig object specifying configuration : consumer key, private key, host URL.

Returns:



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/mastercard_merchant_checkout/api/payment_data_api.rb', line 20

def self.show(transaction_id, query_params, api_config = nil)
		 path = "/masterpass/paymentdata/{transactionId}"
service_request = ServiceRequest.new
 service_request.path_params["transactionId"] = transaction_id
	 

	 service_request.query_params = query_params
service_request.content_type = "application/json"
api_client = ApiClient.new(api_config)
 api_client.api_tracker = SdkApiTracker.new
 api_client.error_handler = ErrorHandler.new
return api_client.call(path, service_request, "GET",PaymentData)
end