thephpleague / omnipay-stripe

Stripe driver for the Omnipay PHP payment processing library
MIT License
184 stars 167 forks source link

undefined method getPaymentIntentReference() #201

Open graytape opened 3 years ago

graytape commented 3 years ago

Hi, I'm trying to make my Stripe-Omnipay SCA compliant but I keep getting an error:

$response = $gateway->authorize([
    'amount'    => $total,
    'currency'  => 'EUR',
    'token'     => $token,
    'returnUrl' => $successUrl,
    'confirm'   => true,
])->setItems($items);

// add stripe data
$data = $response->getData();
$data['expand'] = array("balance_transaction");
$response = $response->sendData($data);

error: Your card was declined. This transaction requires authentication.

If I try the manual setting:

// set confirm manually
$paymentIntentReference = $response->getPaymentIntentReference();
$paymentIntentReference = 'unique_id'.rand(0, 99);
$response = $response->confirm([
    'paymentIntentReference' => $paymentIntentReference,
    'returnUrl' => $site['root'].PAY_SUCCESS_SLUG,
]);

I get the following error message:

Error: Call to undefined method Omnipay\Stripe\Message\AuthorizeRequest::getPaymentIntentReference()

Any suggestion?

(Version 3.1.0)

nfunwigabga commented 3 years ago

Same issue here.

iamjohnseun commented 1 year ago

+1