def get_payment_status(external_reference)
      response = send_search_request({external_reference: external_reference, access_token: access_token})

      if response['results'].empty?
        "pending"
      else
        response['results'][0]['collection']['status']
      end
    end
def get_payment_status(external_reference)
      response = send_search_request({external_reference: external_reference, access_token: access_token})

      if response['results'].empty?
        "pending"
      else
        response['results'][0]['collection']['status']
      end
    end
def get_external_reference(operation_id)
   response = send_notification_request(operation_id)
   if response
     response['collection']['external_reference']
   end
 end