Exemplo n.º 1
0
def create_suds_client(wsdl_url, key_data, cert_data, tbk_cert_data):
    transport = HttpTransport()
    wsse = Security()
    wsse_plugin = WssePlugin.init_from_data(
        key_data=key_data,
        cert_data=cert_data,
        tbk_cert_data=tbk_cert_data,
    )
    return Client(
        url=wsdl_url,
        transport=transport,
        wsse=wsse,
        plugins=[wsse_plugin],
    )
Exemplo n.º 2
0
    def get_client(self,):
        transport=HttpTransport()
        wsse = Security()

        return Client(
            self._get_webpay_urls(),
            transport=transport,
            wsse=wsse,
            plugins=[
                WssePlugin(
                    keyfile=self.get_private_key(),
                    certfile=self.get_public_cert(),
                    their_certfile=self.get_WebPay_cert(),
                ),
            ],
        )
Exemplo n.º 3
0
    def __init__(self, *args, **kwargs):
        super(IBabsBaseExtractor, self).__init__(*args, **kwargs)

        try:
            ibabs_wsdl = self.source_definition['wsdl']
        except Exception as e:
            ibabs_wsdl = settings.IBABS_WSDL

        try:
            self.client = Client(ibabs_wsdl,
                                 port='BasicHttpsBinding_IPublic',
                                 transport=HttpTransport(),
                                 timeout=10,
                                 headers={'User-Agent': settings.USER_AGENT})
        except Exception as e:
            log.error('Unable to instantiate iBabs client: ' + str(e))
Exemplo n.º 4
0
 def get_client():
     """
     Obtenemos la informacion de nuestro cliente.
     """
     return Client(
         settings.WEBPAY_WSDL,
         transport=HttpTransport(),
         wsse=Security(),
         plugins=[
             WssePlugin(
                 keyfile=settings.WEBPAY_OUR_PRIVATE_KEY,
                 certfile=settings.WEBPAY_OUR_PUBLIC_CERT,
                 their_certfile=settings.WEBPAY_CERT,
             ),
         ],
     )
    def get_client(wsdl_url, our_keyfile_path, our_certfile_path,
                   their_certfile_path):
        transport = HttpTransport()
        wsse = Security()

        return Client(
            wsdl_url,
            transport=transport,
            wsse=wsse,
            plugins=[
                WssePlugin(
                    keyfile=our_keyfile_path,
                    certfile=our_certfile_path,
                    their_certfile=their_certfile_path,
                ),
            ],
        )