iDeal未在omnipay-rabobank库中列出 - [Laravel Framework]

时间:2017-02-23 18:54:34

标签: laravel laravel-5 omnipay

我目前正在使用 Omnipay 扩展程序库来处理我的Rabobank omnikassa交易。现在,当我使用下面的代码时,我会选择所有信用卡方式,但页面上未列出 IDEAL MINITIX 。我不确定我做错了什么,第一次使用外部库来处理我的付款。 Rabobank Omnikassa应默认显示所有可用的付款方式。

图书馆: https://github.com/thephpleague/omnipay-rabobank

我的代码:iDealController

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use Omnipay\Omnipay;


class iDealController extends Controller
{
   public function loadPage()
   {
       $sOrderId = 'WEB' . time(); // This should be unique - Order id
       $sTransactionReference = $sOrderId . date('His'); // This should be unique - Identifier of transaction
       $amount = 10.00;

       $gateway = Omnipay::create('Rabobank');


       $request = $gateway->purchase(array(
           'testMode' => true,
           'merchantId' => '002020000000001',
           'keyVersion' => '1',
           'secretKey' => '002020000000001_KEY1',
           'amount' => $amount,
           'returnUrl' => 'http://localhost:8888/',
           'automaticResponseUrl' => 'http://localhost:8888/',
           'currency' => 'EUR',
           'transactionReference' => $sTransactionReference,
           'orderId' => $sOrderId,
           'customerLanguage' => "EN"
           )
       );

       $data = $request->getData();
       $response = $request->sendData($data);

       if ($response->isSuccessful()) {
           // payment was successful: update database
           print_r($response);
       } elseif ($response->isRedirect()) {
           // redirect to offsite payment gateway
           $response->redirect();
       } else {
           // payment failed: display message to customer
           echo $response->getMessage();
       }

       return view('omnikassa');
   }
}

当我向'PaymentMethod' => 'IDEAL'数组添加request时,会出现以下错误:Technical problem : code=03 message=None of the merchant's payment means is compliant with the transaction context。所以肯定会出现问题。

0 个答案:

没有答案