Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom parameter #265

Open
Wikko0 opened this issue Dec 25, 2022 · 0 comments
Open

Custom parameter #265

Wikko0 opened this issue Dec 25, 2022 · 0 comments

Comments

@Wikko0
Copy link

Wikko0 commented Dec 25, 2022

Hi, try to add an extra parameter but it doesn't work. I tried the following ways:

     `$purchase = $this->gateway->purchase(array(
            'amount' => $request->amount,
            'currency' => $this->client->currency,
            'returnUrl' => url('success'),
            'cancelUrl' => url('error')
        ));
        $purchase->setParameter('custom', 'custom');
        $response = $purchase->send();`

Error- Call to protected method Omnipay\Common\Message\AbstractRequest::setParameter() from scope App\Http\Controllers\PaymentController

§

$purchase = $this->gateway->purchase(array( 'amount' => $request->amount, 'currency' => $this->client->currency, 'returnUrl' => url('success'), 'cancelUrl' => url('error') )); $data = $purchase->getData(); $data['RANDOM_DATA'] = 'hello'; $purchase->sendData($data);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant