バージョン選択

フォーラム

メニュー

オンライン状況

44 人のユーザが現在オンラインです。 (38 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 44
もっと...

サイト内検索

質問 > フロント機能 > EC-CUBE2 ソフトバンクペイメントへの接続について

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
12AI24
投稿日時: 2023/1/10 18:31
対応状況: −−−
常連
登録日: 2017/3/8
居住地:
投稿: 31
EC-CUBE2 ソフトバンクペイメントへの接続について
現在、EC-CUBEの2.13系で、決済処理を組み込んでいます
他のサーバーでソフトバンクペイメントへの接続ができたため、同じように組み込んだところ、エラーが出ます。
何が原因かお教えください。


const PAYMENT_URL = "https://stbfep.sps-system.com/api/xmlapi.do";

$postXML = "<?xml version="1.0" encoding="Shift_JIS"?>" .
"<sps-api-request id="ST11-00111-101">" .
"・・・・決済情報";

// 接続URL
$url = PAYMENT_URL;

// データ送信処理
$ch = curl_init();

$merchant_id = mb_convert_encoding(MERCHANT_ID, 'Shift_JIS', 'UTF-8');
$service_id = mb_convert_encoding(SERVICE_ID, 'Shift_JIS', 'UTF-8');
$hashkey = mb_convert_encoding(HASH_KEY, 'Shift_JIS', 'UTF-8');

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, $merchant_id . $service_id . ":" . $hashkey);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_SSLVERSION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postXml);

$result = curl_exec( $ch );

if(curl_errno($ch) > 0){
}
else {
$xml = simplexml_load_string( $result );

// ここでエラーが発生する
}

[エラー内容]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn\'t understand how to supply
the credentials required.</p>
</body></html>

$postXMLの内容は、他のサーバーでは、同じパラメータを送信した場合、正常に決済処理を行うことができます。

環境は、UTF-8です、よろしくお願いします。
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
 » EC-CUBE2 ソフトバンクペイメントへの接続について 12AI24 2023/1/10 18:31
     Re: EC-CUBE2 ソフトバンクペイメントへの接続について mcontact 2023/1/10 18:54
       Re: EC-CUBE2 ソフトバンクペイメントへの接続について 12AI24 2023/1/10 19:08
         Re: EC-CUBE2 ソフトバンクペイメントへの接続について mcontact 2023/1/11 10:51
           Re: EC-CUBE2 ソフトバンクペイメントへの接続について 12AI24 2023/1/11 11:11

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,288名です
総投稿数は109,688件です

投稿数ランキング

1
seasoft
7365
2
468
3217
3
AMUAMU
2712
4
nanasess
2303
5
umebius
2085
6
yuh
1818
7
h_tanaka
1610
8
red
1567
9
mcontact
1240
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
796
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.