I am trying to use the following the code to grab the balance in a gift card without using the walmart for enduser.
<?php
$url = "https://www.walmart.com/cservice/ProcessShoppingCard.do";
//
$h = curl_init();
curl_setopt($h, CURLOPT_URL, $url);
curl_setopt($h, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($h, CURLOPT_POST, true);
curl_setopt($h, CURLOPT_POSTFIELDS, array(
'cardNumber' => '1234567890123456',
'pin' => '1234',
'GetCardBalance' => 'GetCardBalance'
));
curl_setopt($h, CURLOPT_HEADER, true);
curl_setopt($h, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($h);
echo $result;
?>
But it seems to only show the page and not the results. I examined the form used in walmart and it has only 3 fields: cardNumber, pin and GetCardBalance.
Which i have used but still not getting the results.
If i go to this url https://www.walmart.com/cservice/ProcessShoppingCard.do And try to check the balance, it does show the response.
Any ideas, what and where i am doing wrong?
Please advice, thanks!