It looks like creating a payment entity requires a number of properties to be passed in:

  $payment = new Payment(array(
    'context' => 'payment_donation',
    'context_data' => array(
      'destination' => $_GET['q'],
    ),
    'currency_code' => $currency_code,
    'description' => $description,
    'finish_callback' => 'payment_donation_finish',
    'method' => $payment_method,
  ));

It would be good to have these documented somewhere.

Comments

joachim created an issue.