wp-pay-gateways /
ideal-advanced-v3
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\XML; |
||
| 4 | |||
| 5 | use SimpleXMLElement; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Title: iDEAL transaction response XML message |
||
| 9 | * Description: |
||
| 10 | * Copyright: 2005-2019 Pronamic |
||
| 11 | * Company: Pronamic |
||
| 12 | * |
||
| 13 | * @author Remco Tolsma |
||
| 14 | * @version 2.0.0 |
||
| 15 | */ |
||
| 16 | class TransactionResponseMessage extends ResponseMessage { |
||
| 17 | /** |
||
| 18 | * The document element name |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | const NAME = 'AcquirerTrxRes'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Constructs and initialize an directory response message |
||
| 26 | */ |
||
| 27 | public function __construct() { |
||
| 28 | parent::__construct( self::NAME ); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Parse the specified XML into an directory response message object |
||
| 33 | * |
||
| 34 | * @param SimpleXMLElement $xml |
||
| 35 | * |
||
| 36 | * @return ResponseMessage |
||
| 37 | */ |
||
| 38 | public static function parse( SimpleXMLElement $xml ) { |
||
| 39 | $message = self::parse_create_date( $xml, new self() ); |
||
| 40 | |||
| 41 | $message->issuer = IssuerParser::parse( $xml->Issuer ); |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 42 | $message->transaction = TransactionParser::parse( $xml->Transaction ); |
||
|
0 ignored issues
–
show
|
|||
| 43 | |||
| 44 | return $message; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |