thephpleague / omnipay-mollie

Mollie driver for the Omnipay PHP payment processing library
MIT License
62 stars 38 forks source link

Error 422: Unprocessable Entity #57

Open robinbonnes opened 6 years ago

robinbonnes commented 6 years ago

When I make a purchase request like this:

$purchase_params = [
                            'amount' => '10.00',
                            'currency' => 'EUR',
                            'description' => 'Test',
                            'returnUrl' => '/return',
                            'notifyUrl' => '/notify',
                            'paymentMethod' => 'ideal',
                            'metadata' => ['order_id' => '1'],
                        ];
$gateway->purchase($purchase_params)->send();

I get the following response:

  #data: array:5 [▼
    "status" => 422
    "title" => "Unprocessable Entity"
    "detail" => "The amount is required for payments"
    "field" => "amount"
    "_links" => array:1 [▼
      "documentation" => array:2 [▼
        "href" => "https://docs.mollie.com/guides/handling-errors"
        "type" => "text/html"
      ]
    ]
  ]

Any idea?

Having the following libraries installed by composer: