Upgraded to latest d7 dev version (8 June) and my snippet below doesn't render...

<?php
print drupal_render(lm_paypal_donate(
  array(25), 
   array(
     'currency_code' => 'GBP', // currency_code
     'item_name' => 'Donation to Abaseen Foundation', // not required but you want to know what they are paying for
'button' => array('text' => 'Make a Donation',)
)
));
?>

I have php code set as filer type and user has right permissions.

Comments

L-four’s picture

You no longer require drupal_render, i changed it so that works the same as drupal 6. The function will still return a render array if you set 'render' to FALSE.

so both these will work.

Just printing the result of the function.

<?php
print lm_paypal_donate(
  array(25), 
   array(
     'currency_code' => 'GBP', // currency_code
     'item_name' => 'Donation to Abaseen Foundation', // not required but you want to know what they are paying for
     'button' => array('text' => 'Make a Donation',)
   )
);
?>

or using the function to generate part of a large render array.

<?php

    $pay_form = lm_paypal_donate(
    array(25), 
     array(
       'currency_code' => 'GBP', // currency_code
       'item_name' => 'Donation to Abaseen Foundation', // not required but you want to know what they are paying for
       'button' => array('text' => 'Make a Donation',),
       'render' => FALSE,
     )
   );
   
  // do somthing to $pay_form

  print drupal_render($pay_form);
?>
sksmithson’s picture

Status: Active » Closed (fixed)

Sweet, that works. Thanks for the speedy response.