Guest User

Untitled

a guest
Nov 15th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?php
  2.  
  3. require __DIR__ . "/path/to/vendor/autoload.php";
  4.  
  5. use cnp\sdk\CnpOnlineRequest;
  6. use cnp\sdk\XmlParser;
  7.  
  8. $hash_in = array('id' => 'id',
  9. 'card' => array('type' => 'VI',
  10. 'number' => '4100000000000000',
  11. 'expDate' => '1213',
  12. 'cardValidationNum' => '1213'),
  13. 'id' => '1211',
  14. 'orderId' => '22@33',
  15. 'reportGroup' => 'Planets',
  16. 'orderSource' => 'ecommerce',
  17. 'amount' => '0');
  18.  
  19. $initialize = new CnpOnlineRequest();
  20. $authorizationResponse = $initialize->authorizationRequest($hash_in);
  21. $response = XmlParser::getDomDocumentAsString($authorizationResponse);
  22.  
  23. print_r($response);
  24. ?>
Add Comment
Please, Sign In to add comment