I am currently testing uc_recurring and it all seems good so far, except for one problem. I want to be able to offer my subscribers a trial period through Paypal WPS... but if I uncheck the "Set the recurring fee amount to the same as selling price of the product at the time of purchase." checkbox and enter differing values for the selling price and the recurring fee, when I check the html code generated for the paypal form, both the a1 and the a3 values default to the selling price. Ideally I want to offer a zero charge for two weeks and then a recurring fee monthly thereafter but I do not seem able to make this work... specifying the "Specify the time to wait to start charging the recurring fee after checkout." to 2 weeks and the "Specify the length of the billing period for this fee." to 1 month all works fine for the other variables, but still a1 and a3 adopt the same value, irrespective of the value I put in as the recurring fee. Any ideas??

Comments

univate’s picture

What are you setting your product price? It would need to be $0 as the first payment charged is the product price.

I can't see anything issue in the code setting a1 as the amount of the order:

$data['a1'] = sprintf("%0.2f", $order->order_total);
neuronomicon’s picture

Thanks for the response univate... I've just run through the following set up to describe to you what I mean... I have a product (role based membership) which I want to offer for two weeks free followed by monthly payments of £10...

1. I set Selling Price 0.00, then in Features > Recurring payments
2. I uncheck "Set the recurring fee amount to the same as selling price of the product at the time of purchase." and
3. Set Recurring fee amount: £10.00
4. I set the Initial charge>Specify the time to wait to start charging the recurring fee after checkout.= 2 weeks
5. Regular interval>Specify the length of the billing period for this fee.= 1 month and
6. set for unlimited billings

When I go to product page it now shows (correctly) that the price is 0.00

I click add to cart > then checkout, fill in details and then > review order... if I look at the paypal code it generates...

<input type="hidden" name="a1" id="edit-a1" value="0.00"  />
<input type="hidden" name="p1" id="edit-p1" value="2"  />
<input type="hidden" name="t1" id="edit-t1" value="W"  />
<input type="hidden" name="a3" id="edit-a3" value="0.00"  />
<input type="hidden" name="p3" id="edit-p3" value="1"  />
<input type="hidden" name="t3" id="edit-t3" value="M"  />
<input type="hidden" name="src" id="edit-src" value="1"  />
<input type="hidden" name="sra" id="edit-sra" value="1"  />

when I would have expected a3 to be 10.00? Clicking through to paypal with this configuration gives me an error "Invalid Regular period. You must specify valid values for the A3, P3 and T3 parameters for a subscription."

I think that it is a3 that is incorrectly set, but don't yet know enough about modules to work out exactly how that can be determined otherwise I would offer a solution rather than a problem :-)

I hope that makes my problem clearer

jarodms’s picture

Here is what I came up with. http://drupal.org/node/716702

Final result in PayPal Sandbox:

Free for the first 14 days
Then $5.00 USD for each month
Effective Date: Mar 2, 2010

Sorry, I thought I searched for this issue, but I mistakenly entered a duplicate.

neuronomicon’s picture

Looks like you cracked it to me :-) Thanks for letting me know

univate’s picture

Status: Active » Closed (duplicate)