Class: MastercardMerchantCheckout::Api::PreCheckoutDataApi

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

Class Method Summary collapse

Class Method Details

.show(pairing_id, api_config = nil) ⇒ PreCheckoutData

PreCheckout Data Service Use the consumer’s pairingID to retrieve their shipping and payment information prior to complete an Express Checkout. You can use the data returned from this service to confirm the user’s payment selections before completing the checkout. API URL: /masterpass/precheckoutdata/:pairing_id

Parameters:

  • pairing_id

    The unique pairing token identifier used to fetch pre-checkout data for a wallet that is paired with a merchant.

  • api_config (defaults to: nil)

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

Returns:



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

def self.show(pairing_id, api_config = nil)
		 path = "/masterpass/precheckoutdata/{pairingId}"
service_request = ServiceRequest.new
 service_request.path_params["pairingId"] = pairing_id
	 

	 
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",PreCheckoutData)
end