Ejemplo n.º 1
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,
                ),
            ],
        )
Ejemplo n.º 3
0
def get_client(our_keyfile_path, our_certfile_path, their_certfile_path):
    wsse = Security()
    wsse.tokens.append(Timestamp())

    return Client(
        WSDL,
        transport=t,
        location=location,
        wsse=wsse,
        headers=headers,
        plugins=[
            WssePlugin(
                keyfile=our_keyfile_path,
                certfile=our_certfile_path,
                their_certfile=their_certfile_path,
            ),
        ],
    )