2

I m trying to implement worldpay on a PHP site using XML direct method but whenever I try to connect I get blank pag.. Can you tell me were you testing the payment gateway on live site. Code:

    $url = 'https://secure.worldpay.com/sso/public/auth/login.html?serviceIdentifier=merchantadmin';
  $ch = curl_init();
  curl_setopt( $ch, CURLOPT_URL, $url );
  curl_setopt($ch, CURLOPT_USERPWD, "username
:password");
  curl_setopt( $ch, CURLOPT_POST, true );
  curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
  curl_setopt( $ch, CURLOPT_POSTFIELDS, $xml );
  $result = curl_exec($ch);
  // curl_close($ch);
  // echo json_encode($result);
  // exit;
return $this->_pageFactory->create();

How to solve it? Anyone can help me to solve this i was used this payment-gateway .

  • make sure you are using this api token url /rest/V1/integration/admin/token – fmsthird Feb 14 at 7:22
  • I used my payment gateway administration Interface url – divya sekar Feb 14 at 7:28
  • try this one $adminUrl = "127.0.0.1/your_Magento_dir/rest/V1/integration/admin/token" – fmsthird Feb 14 at 7:36
  • assuming you are running on localhost 127.0.0.1 – fmsthird Feb 14 at 7:36
  • 1
    its not working now also it gives null prnt.sc/mkwj6 – divya sekar Feb 14 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.