خرید بک لینک

Vote count: 0

I am trying to integrate the MIGS With Php. & It is not showing any result nor any status . I have posted three variables in the $postdata array , i have posted the card number , card expiry and the amount in the $postdata array .

This is the html

<table>
<tr>
<td>Cardholder's First Name:</td>
<td><input type="text" name="First_Name"></td>
</tr><tr>
<td>Cardholder's Last Name:</td>
<td><input type="text" name="Last_Name"></td>
</tr><tr>
<td>Credit Card Number:</td>
<td><input type="text" name="Card_Num"></td>
</tr><tr>
<td colspan="2" align="center">
<small>Please enter the expiration date as follows:
two digits of month and two digits of year.
For instance, January 2008 has to be entered as 0108:</small></td>
</tr><tr>
<td>Exp. date (mmyy):</td>
<td><input type="text" name="Card_Exp" maxlength="4"></td>
</tr><tr>
<td colspan="2" align="center">
<small>The Card Verification Code (Card ID or CVV2)
is required for American Express,Visa and MasterCard.
Please enter: for American Express - 4 digits on front of card;
for Visa and Mastercard - last 3 digits on back of card:</small>
</td>
</tr><tr>
<td>Card Number:</td>
<td><input type="text" name="Card_Code"></td>
</tr><tr>
<td colspan="2" align="center"><small>
Please enter the address at which the credit card bills are received:
</small></td>
</tr><tr>
<td>Amount</td>
<td><input type="number" name="amount"></td>
</tr><tr>
<td>City:</td>
<td><input type="text" name="City"></td>
</tr><tr>
<td>Country:</td>
<td><input type="text" name="Country"></td>
</tr><tr>
<td colspan="2" align="center">
<input type="submit" value="Submit payment">
</td>
</tr>
</table>

Now i have use some testing merchant id along with the access code

Not the three variables which i have passed in the $postdata array are

        $cardnum= $_POST['Card_Num'];
        $cardexp= $_POST['Card_Exp'];
        $amount =$_POST['amount'];


$SECURE_SECRET = "YEOCOEN29B0785F1FF1E3C0FA8A3FUJK";   
        $accessCode = '546484645';
        $merchantId = 'ABERCROMBIEKIDS#119GARDENCITYNY';


        $cardnum= $_POST['Card_Num'];
        $cardexp= $_POST['Card_Exp'];
        $amount =$_POST['amount'];
        $unique_id = rand(999999,8988888888);//this is a sample random no
        $postdata = array(

                "vpc_CardNum" => $cardnum,
                "vpc_CardExp" => $cardexp,
                "vpc_AccessCode" => $accessCode,
                "vpc_Amount" => ($amount*100),
                "vpc_Command" => 'pay',
                "vpc_Locale" => 'en',
                "vpc_MerchTxnRef" => $unique_id,
                "vpc_Merchant" => $merchantId,
                "vpc_OrderInfo" => 'this is a product',
                "vpc_RetuURL" => "https://localhost/success.php",
                "vpc_Version" => '1');


        $vpcURL = 'https://migs.mastercard.com.au/vpcpay?';
        $md5Hash = $SECURE_SECRET;
        $appendAmp = 0;


        foreach ($wpay_postdata as $key => $value) {

            if (strlen($value) > 0) {

                if ($appendAmp == 0) {
                    $vpcURL .= urlencode($key) . '=' . urlencode($value);
                    $appendAmp = 1;
                } else {
                    $vpcURL .= '&' . urlencode($key) . "=" . urlencode($value);
                }
                $md5Hash .= $value;
            }
        }

            var_dump($postdata);
                print_r($postdata);
        if (strlen($SECURE_SECRET) > 0) {
            $vpcURL .= "&vpc_SecureHash=" . strtoupper(md5($md5Hash));
        }
        header("Location: " . $vpcURL);

For posting the result i have also used var_dump($postdata) but it is not working

asked 35 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 2 فروردين 1395 ساعت: 1:42

صفحه بندی