Skip to content

Custom parameter #265

@Wikko0

Description

@Wikko0

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions