Alipay y WeChat Pay
AliPay y WeChat Pay
|  |  | 
|  |  | 
Si necesita activar KakaoPay, consulta a tu contacto de Sipay.
 
Funciones
- Tipo: e-wallet
- Canal:
- Cobros por Internet
- Cobros en Persona con QR en PIN Pad
- Cobros en Persona con lector de QR externo
 
- Operaciones:
- Ventas
- Devolución parcial
- Devolución total
 
Integración
Recuerda que estas llamadas API serán peticiones HTTP POST a un la dirección TCP/IP donde está instalado el DeviceHub. Normalmente esta dirección será:
POST http://localhost:17000
Para realizar la integración necesitará una instalación válida de DeviceHub y un PIN Pad que soporte esta operativa. Las llamadas de DeviceHub que necesitará son:
- InitializeDevice.
- GetNextMessage.
- CallSpecificFunction, consulte este vínculo para comprender los elementos comunes. Después acude a esta sección para integrar lo específico:
- Función 70: generar QR en el PIN Pad para cobro con un Wallet específico.
- Función 71: lectura de QR con un dispositivo externo y cobro.
- Función 72: devolución.
- Función 73: anulación de operación en curso.
 
Además deberás tener unas credenciales API e-commerce con los métodos de pago activados. Los datos que necesitan son:
- key
- resource
- secret
La configuración del DeviceHub debe tener el siguiente contenido adicional antes del fin de sección </PROTOCOL_SETTINGS>:
...
</PUP_15_SETTNIGS>
<WECHATPAY_SETTINGS>
<WECHATPAY_BASE_URL>https://sandbox.sipay.es</WECHATPAY_BASE_URL>
<WECHATPAY_QR_URL>altp_starpay/api/v1/qr_generator</WECHATPAY_QR_URL>
<WECHATPAY_PAY_URL>altp_starpay/api/v1/barcode_pay</WECHATPAY_PAY_URL>
<WECHATPAY_REFUND_URL>altp_starpay/api/v1/refund_operation</WECHATPAY_REFUND_URL>
<WECHATPAY_STATUS_URL>altp_starpay/api/v1/operation_status</WECHATPAY_STATUS_URL>
<WECHATPAY_TIMEOUT>20</WECHATPAY_TIMEOUT>
</WECHATPAY_SETTINGS>
</PROTOCOL_SETTINGS>
...
Siendo la directiva <WECHATPAY_BASE_URL> el entorno entre estos valores:
- https://sandbox.sipay.espara sandbox, pruebas e integración.
- https://live.sipay.espara producción, transacciones reales.
Identificadores de wallet <WALLET></WALLET> disponibles:
- wechatpay
- alipay
Con estos valores generaremos la imagen QR correcta.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
    <soap:Header/>
    <soap:Body>
        <tem:CallSpecificFunctionRequest>
            <tem:Header>
                <tem:ClientId>ClientIdValue</tem:ClientId>
                <tem:StoreId>StoreIdValue</tem:StoreId>
                <tem:PosId>PosValue</tem:PosId>
                <tem:Lang>Idioma</tem:Lang>
                <tem:ExtraData1></tem:ExtraData1>
            </tem:Header>
            <tem:Function>70</tem:Function>
            <tem:Modifier>0</tem:Modifier>
            <tem:Parameter1>Importe</tem:Parameter1>
            <tem:Parameter2>Ticket</tem:Parameter2>
            <tem:Parameter3>
                <NONCE>nonce</NONCE>
                <RESOURCE>resource</RESOURCE>
                <KEY>key</KEY>
                <WALLET>identificador del wallet</WALLET>
                <ORDER_DESC>Descripción del pedido</ORDER_DESC>
                <STORE_NO></STORE_NO>
                <TERMINAL_NO></TERMINAL_NO>
                <EMPLOYEE_NO></EMPLOYEE_NO>
                <REMARK></REMARK>
            </tem:Parameter3>
        </tem:CallSpecificFunctionRequest>
    </soap:Body>
</soap:Envelope>