0

ドキュメントによると、次のようなフォームを送信できます (例)。

<form method="post" action="https://test.ipg-online.com/connect/gateway/processing">
    <input type="hidden" name="txntype" value="sale">
    <input type="hidden" name="timezone" value="CET"/>
    <input type="hidden" name="txndatetime" value="2015:12:11-09:12:47"/>
    <input type="hidden" name="hash" value="7a17dcc15df2819649ca80b7921"/>
    <input type="hidden" name="storename" value="12345678"/>
    <input type="hidden" name="mode" value="fullpay"/>
    <input type="text"   name="chargetotal" value="13.00"/>
    <input type="hidden" name="currency" value="826"/>
    <input type="hidden" name="responseSuccessURL" value="http://example.co.uk/thanks" />
    <input type="hidden" name="responseFailURL" value="http://example.co.uk/failure" />
    <input type="submit" value="Submit">
</form>

そして、それは Postman のようなものを使用して機能します (ただし、ここでは正しいものを提供していませんstorename)。「仕事」とは、彼らのゲートウェイに到達し、カードの詳細や配送先住所などを入力できることを意味します.

正しいものを取得するためにhash、Omnipay ライブラリtxndatetimeを使用できます。FirstData_Connect

を使用できると思っていましたpublic function getDataが、実際には、ユーザーカード、cvv コード、有効期限などの詳細が必要です。サイトにそのようなインターフェイスは必要ありません。ユーザーがクリックできるようにしたいだけです。https://test.ipg-online.com/connect/gateway/processing - 上記のフォームの例のように。

では、Omnipay ライブラリを利用するには、PHP 側をどのように構成すればよいでしょうか? これまでのところ、私は持っています。

$gateway = Omnipay::create('FirstData_Connect');
$gateway->setStoreId($storeId);
$gateway->setSharedSecret($sharedSecret);

$response = $gateway->purchase(array(
    'returnUrl' => $returnUrl . '?' . http_build_query($arguments),
    'cancelUrl' => $cancelUrl,
    'amount' => $payment->getAmount(),
    'transactionId' => $paymentId,
))->send();

$result = $response->getData();
return $result;

ただし、上で述べたように、ユーザーのカードの詳細も提出する必要があります。したがって、エラーが発生します。

"message":"The card parameter is required",
"class":"Omnipay\\Common\\Exception\\InvalidRequestException
4

1 に答える 1