Allegro WebAPI

Programming interface of the Allegro platform

doCancelTransaction

Last change: 25.04.2013 r.
Availability:
This method allows the buyer to cancel an initiated PayU payment.

  1. session-id | string | required
    User’s session identifier received using the doLogin(Enc) method.
  2. transaction-id | long | required
    Transaction identifier.



Sample structure of method call

$docanceltransaction_request = array(
   'session-id'
=> '22eb99326c6be29aa16d07d622bcfbcbee94ad54846f2f4e03_1',
   'transaction-id' => 238549373
);

  1. cancellation-result | int
    Confirmation of transaction cancellation (1).



Sample structure of server reply

$docanceltransaction_response = array(
  
'cancellation-result' => 1
);


  • ERR_NO_SESSION / ERR_SESSION_EXPIRED
    Invalid session identifier or the session has expired.
  • ERR_CANCELLATION_UNAUTHORIZED
    Provided transaction has not been created by the logged in user.
  • ERR_TRANSACTION_DOESNT_EXIST
    Provided transaction does not exist.
  • ERR_TRANSACTION_FINISHED
    Provided transaction has been already completed by PayU, it has been rejected or withdrawn.
  • ERR_TRANSACTION_ALREADY_CANCELLED
    Provided transaction has been already cancelled.
  • ERR_PAYU_UNEXPECTED_PROBLEM
    PayU error.

Allegro is not to be held liable for consequences of using examples of the published code. It does not guarantee its correct operation either. The code you see serves as an example only and may contain errors.