1. Wstęp
  2. Corporate Node
  3. Operacje SOAP
  4. getPurchaseDocument

getPurchaseDocument

Operacja getPurchaseDocument umożliwia pobranie dokumentu sprzedaży, danych do faktury, danych do dostawy po zakończonej transakcji płacenia o podanym uniqueTransferId.

Przykładowe zapytanie SOAP:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="ns1">
   <soapenv:Header/>
   <soapenv:Body>
      <ns1:getPurchaseDocument soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <uniqueTransferId xsi:type="xsd:string">0000-55-9999</uniqueTransferId>
      </ns1:getPurchaseDocument>
   </soapenv:Body>
</soapenv:Envelope>

Przykładowa odpowiedź SOAP:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ns="ns1">
 <SOAP-ENV:Body  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <ns:getPurchaseDocumentResponse>
   <return>
    <purchaseDocument>{"system_transaction_id":"00000000000000000000000000000000","merchant_unique_purchase_id":"12326","related_system_transaction_id":"00000000000000000000000000000000","related_merchant_unique_purchase_id":"","related_purchase_processing_item_id":"00000000000000000000000000000000","most_outer_transaction_id":"00000000000000000000000000000000","fiscal_transcation_id":"00000000000000000000000000000000","POS_id":"00000000000000000000000000000000","last_modificationtype_date":1456743287,"last_modificationtype_borgtime":1456743294133066,"request_date":1456743250,"request_borgtime":0,"completion_or_reject_date":1456743287,"completion_or_reject_borgtime":0,"purchase_processing_item_state":2,"amount":5000,"entry_type":5,"user_payer_idn":"demo2-2016c","user_receiver_idn":"lukaszb3","cashier_name":"","beneficiary_id":"","sales_document_data":{"sales_document_id":"","sales_document_kind":"SALE_INFO_TYPE","sales_document_date":0,"sales_document_borgtime":0,"seller_idn":"lukaszb3","seller_public_name":"lukaszb3","seller_data":{"company":{"name":"","NIP":"","REGON":"","KRS":""},"person":{"first_name":"","last_name":"","PESEL":""},"address":{"street":"","city":"","zip":"","country":""},"fax":"","www":"","email":""},"buyer_idn":"demo2-2016c","buyer_public_name":"demo2-2016c","buyer_data":{"company":{"name":"","NIP":"","REGON":"","KRS":""},"person":{"first_name":"","last_name":"","PESEL":""},"address":{"street":"","city":"","zip":"","country":""},"fax":"","www":"","email":""},"trade_date":0,"total_amount_net":0,"total_amount_gross":0,"delivery_option":{"delivery_id":"","delivery_description":"","delivery_kind":"","delivery_price_net":0,"vat":{"percent":0,"amount":0},"delivery_price_gross":0,"estimated_delivery_date":0},"delivery_target":{"extra_info":"","company":{"name":"","NIP":"","REGON":"","KRS":""},"person":{"first_name":"","last_name":"","PESEL":""},"address":{"street":"","city":"","zip":"","country":""}}},"notes":"","extra_json":"","reserved":""}
    </purchaseDocument>
    <requestStatus>SUCCESS</requestStatus>
    <requestStatusDescription>Request succeeded.</requestStatusDescription>
   </return>
  </ns:getPurchaseDocumentResponse>
 </SOAP-ENV:Body>

Parametry zapytania:

ParametrTypOpisWymagane?
uniqueTransferIdstringUnikatowy identyfikator transakcji nadany przez aplikację zlecającą płacenieTak

Parametry odpowiedzi:

nazwatypopis
purchaseDocumentstringdokument potwierdzenia zakupu, w formacie JSON
requestStatusstringstatus wykonania zapytania
requestStatusDescriptionstringopis statusu

Możliwe błędy:

BłądOpis
ERR_INVALID_TRANSFER_IDNieprawidłowy identyfikator transakcji
Czy ten artykuł jest dla Ciebie pomocny? Tak Nie

Jak możemy pomóc?