class MastercardMasterpassMerchant::Api::PostbackApi
Public Class Methods
create(merchant_transactions, api_config = nil)
click to toggle source
Postback Service This is the final step of MasterPass transaction. MasterPass transaction is a service call from the merchant to MasterPass,communicating the result of the transaction (success or failure). This is a mandatory step. Abandoned transactions do not need to be reported. The <TransactionId> value should be the value from the <TransactionId> element of the Checkout
XML returned in the Checkout
request. @param merchant_transactions Merchant transactions details. @param api_config Optional ApiConfig object specifying configuration : consumer key, private key, host URL. @return [MerchantTransactions]
# File lib/mastercard_masterpass_merchant/api/postback_api.rb, line 19 def self.create(merchant_transactions, api_config = nil) path = "/masterpass/v6/transaction" service_request = ServiceRequest.new service_request.body = merchant_transactions service_request.content_type = "application/xml" 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",MerchantTransactions) end