0
나는 인터넷상의 모든 곳을 검색해 보았고 아무 것도 작동시키지 못했습니다.Omnipay Paypal Express에 맞춤 변수 추가하기
내 'Paypal_Express'Omnipay 구매에 사용자 ID를 추가하려고합니다.
그러나 https://github.com/thephpleague/omnipay-paypal/issues/10에 설명 된 솔루션은 저에게 적합하지 않습니다. 함수 sendData가 존재하지 않는다고합니다. $ request-> setTransactionId(); 와 $ request-> setDescription(); 또한 오류를 던졌습니다. 다른 사람이이 작업을 수행 할 수 있었습니까?
$order_paramaters = array(
'amount' => $grand_total,
);
Omnipay::setParameter('custom', $cart->user_id);
$response = Omnipay::purchase($order_paramaters)->send();
내가 얻을 : 또한 시도
call_user_func_array() expects parameter 1 to be a valid callback, cannot access protected method Omnipay\PayPal\ExpressGateway::setParameter()
:
$gateway = Omnipay::create('PayPal_Express');
$gateway->setParameter('custom', $cart->user_id);
$response = $gateway->purchase($order_paramaters)->send();
내가 얻을 :
Call to protected method Omnipay\Common\AbstractGateway::setParameter() from context 'App\Http\Controllers\CartController'
어떤 도움이 크게 감사합니다.
$gateway = Omnipay::create('PayPal_Express');
$gateway->setParameter('custom', $cart->user_id);
$response = $gateway->purchase($order_paramaters)->send();
당신이 시도해야합니다 :