-2

私はJavaHSBCAPI支払いゲートウェイスクリプトを探しています。私はそれをphpで開発しましたが、javaに来てどうすればそれを行うことができますか。以下は私が使用したphpコードです

$ch = curl_init();
$url = ‘https://www.secure-epayments.apixml.hsbc.com’;
 curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_data_will_go_here);
ob_start();
$data = curl_exec($ch);
curl_close ($ch);
ob_end_clean();
4

1 に答える 1

0

HTTPConnection クラスを見てみましょう。これが役立つかもしれません!

http://docs.oracle.com/javase/1.5.0/docs/api/java/net/HttpURLConnection.html

于 2013-01-17T09:53:15.547 に答える