def create_request(payment_transaction)
      validate_payment_transaction payment_transaction

      request = payment_transaction_to_request payment_transaction

      request.api_method  = @api_method
      request.end_point   = payment_transaction.query_config.end_point
      request.gateway_url = payment_transaction.query_config.gateway_url
      request.signature   = create_signature payment_transaction

      request
    rescue Exception => error
      payment_transaction.add_error error
      payment_transaction.status = PaymentTransaction::STATUS_ERROR

      raise error
    end
def create_request(payment_transaction)
      validate_payment_transaction payment_transaction

      request = payment_transaction_to_request payment_transaction

      request.api_method  = @api_method
      request.end_point   = payment_transaction.query_config.end_point
      request.gateway_url = payment_transaction.query_config.gateway_url
      request.signature   = create_signature payment_transaction

      request
    rescue Exception => error
      payment_transaction.add_error error
      payment_transaction.status = PaymentTransaction::STATUS_ERROR

      raise error
    end
Create API gateway request from payment transaction data

 @param    payment_transaction   [PaymentTransaction]    Payment transaction for query

 @return                         [Request]               Request object