recurly/recurly-client-php — Issue #11: Recurly_CouponRedemption::redeemCoupon does not work statically
Author: TheDeveloper
Created: 2011-11-01 17:42:44+00:00
State: open

According to the documentation here: http://docs.recurly.com/client-libraries/php/coupon-redemption, coupons are supposed to be redeemed by calling:

$redemption = Recurly_CouponRedemption::redeemCoupon('account_code','coupon_code');

This in practise fails with:

PHP Fatal error: Using $this when not in object context

The workaround I've found for now is this:

$redemption = new RecurlyCouponRedemption($accountCode);
$redeemed = $redemption->create($couponCode);