Skip to main content

Alipay y WeChat Pay

AliPay y WeChat Pay

pcp alipaypcp wechatpay

If you need to activate Alipay, consult your Sipay contact.

Functions

  • Type: e-wallet
  • Channel:
    • Online Payments
    • In-Person Payments with QR on PIN Pad
    • In-Person Payments with External QR Reader
  • Operations:
    • Sales
    • Partial Refund
    • Full Refund

Integration

note

Remember that these API calls will be HTTP POST requests to the TCP/IP address where the DeviceHub is installed. Typically, this address will be:

POST http://localhost:17000

To perform the integration, you'll need a valid installation of DeviceHub and a PIN Pad that supports this operation. The DeviceHub calls you'll need are:

  • InitializeDevice.
  • GetNextMessage.
  • CallSpecificFunction, refer to this link to understand common elements. Then, go to this section to integrate the specific ones:
    • Function 70: Generate QR on the PIN Pad for payment with a specific Wallet.
    • Function 71: QR reading with an external device and payment.
    • Function 72: Refund.
    • Function 73: Cancellation of ongoing operation.

Additionally, you'll need API e-commerce credentials with the activated payment methods. The required data includes:

  • key
  • resource
  • secret

The DeviceHub configuration should have the following additional content before the end of the section </PROTOCOL_SETTINGS>:

devicehub.xml
...
</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>
...

Considering the directive <WECHATPAY_BASE_URL>, the environment lies between these values:

  • https://sandbox.sipay.es for sandbox, testing, and integration.
  • https://live.sipay.es for production, real transactions.

Available wallet identifiers <WALLET></WALLET>:

  • wechatpay
  • alipay

With these values, we'll generate the correct QR image.

prototipo de petición
<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>