#StackBounty: #magento2 #payment-gateway #curl WorldPay Payment Integration using PHP and direct XML method curl API return blank page …

Bounty: 50

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 .


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.