Class: MastercardMerchantCheckout::Api::ExpressCheckoutApi

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

Class Method Summary collapse

Class Method Details

.create(express_checkout_request, api_config = nil) ⇒ PaymentData

ExpressCheckout Service Use this service to retrieve the consumer’s full payment card, shipping address, and recipient personal information from Masterpass when performing an Express Checkout. If the merchant is PCI-compliant, then this API will return the complete payload. If the merchant is not PCI-compliant, then this API will only return non-PCI data. In both cases, a new pairingId will be returned to the merchant. API URL: /masterpass/expresscheckout

Parameters:

  • express_checkout_request

    Express Checkout Request.

  • 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/express_checkout_api.rb', line 20

def self.create(express_checkout_request, api_config = nil)
		 path = "/masterpass/expresscheckout"
service_request = ServiceRequest.new
 

service_request.body = express_checkout_request
	 
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, "POST",PaymentData)
end