new gocardless api http error 500

207 Views Asked by At

When using the new gocardless api examples I can list customers so I'm assuming that I have composer installed correctly but when I try the example for creating a subscription (as listed below) I get http error 500 does anybody know what I may be doing wrong?

<?php
require 'vendor/autoload.php';

$client = new \GoCardlessPro\Client(array(
  'access_token' => 'my_sandbox_access_token_goes_here',
  'environment'  => \GoCardlessPro\Environment::SANDBOX
));

$client->subscriptions()->create([
  "params" => ["amount" => 25,
               "currency" => "GBP",
               "name" => "Monthly test",
               "interval_unit" => "monthly",
               "day_of_month" => 1,
               "metadata" => ["order_no" => "test1"],
               "links" => ["mandate" => "MA125"]]
]);
?>

Thanks

0

There are 0 best solutions below