PHP-MySQL-ecommerce-website icon indicating copy to clipboard operation
PHP-MySQL-ecommerce-website copied to clipboard

Can you add an option to pay by credit card?

Open serhatunur opened this issue 3 years ago • 0 comments

/3DModelResults.php"; $strErrorURL = "https:///3DModelResults.php"; $SecurityData = strtoupper(sha1($strProvisionPassword.$strTerminalID_)); $HashData = strtoupper(sha1($strTerminalID.$strOrderID.$strAmount.$strSuccessURL.$strErrorURL.$strType.$strInstallmentCount.$strStoreKey.$SecurityData)); ?>

3D Security Level:
Card Number:
Expire Date (mm):
Expire Date (yy):
CVV2:

<title></title>
                <GVPSRequest>

                <Mode>$strMode</Mode>

                <Version>$strVersion</Version>

                <ChannelCode></ChannelCode>

                <Terminal><ProvUserID>$strProvUserID</ProvUserID><HashData>$HashData</HashData><UserID>$strUserID</UserID><ID>$strTerminalID</ID><MerchantID>$strMerchantID</MerchantID></Terminal>

                <Customer><IPAddress>$strIPAddress</IPAddress><EmailAddress>$strEmailAddress</EmailAddress></Customer>

                <Card><Number></Number><ExpireDate></ExpireDate><CVV2></CVV2></Card>

                <Order><OrderID>$strOrderID</OrderID><GroupID></GroupID><AddressList><Address><Type>B</Type><Name></Name><LastName></LastName><Company></Company><Text></Text><District></District><City></City><PostalCode></PostalCode><Country></Country><PhoneNumber></PhoneNumber></Address></AddressList></Order><Transaction><Type>$strType</Type><InstallmentCnt>$strInstallmentCount</InstallmentCnt><Amount>$strAmount</Amount><CurrencyCode>$strCurrencyCode</CurrencyCode><CardholderPresentCode>$strCardholderPresentCode</CardholderPresentCode><MotoInd>$strMotoInd</MotoInd><Secure3D><AuthenticationCode>$strAuthenticationCode</AuthenticationCode><SecurityLevel>$strSecurityLevel</SecurityLevel><TxnID>$strTxnID</TxnID><Md>$strMD</Md></Secure3D>

                </Transaction>

                </GVPSRequest>";



    $ch=curl_init();

    curl_setopt($ch, CURLOPT_URL, $strHostAddress);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_POST, 1) ;

    curl_setopt($ch, CURLOPT_POSTFIELDS, "data=".$strXML);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

    $results = curl_exec($ch);

    curl_close($ch);



    echo "<b>Giden İstek </b><br />";

    echo $strXML;

    echo "<br /><b>Gelen Yanıt </b><br />";

    echo $results;

}



foreach($_POST as $key => $value)

{

    echo "<br>".$key." : ".$value;

}

?>

serhatunur avatar Sep 22 '21 12:09 serhatunur