Google Product Forums

Subscription challenges with SetStartDate (PHP using lib 1.3.2)

bbutte Mar 25, 2012 1:31 PM
Posted in group: Google Checkout Merchant

Categories: Integration Troubleshooting :

My code below works correctly:

$currency = "USD";    


$cart
= new GoogleCart(GOOGLEMERCHANTID, GOOGLEMERCHANTKEY, GOOGLESERVERTYPE, $currency);
$item
= new GoogleItem("Subscription", "one years access to bepublicloud", 1, 11.99);
$subscription_item
= new GoogleSubscription("google", "YEARLY", 11.99);
$recurrent_item
= new GoogleItem("fee", "recurring fee", 1, 11.99);

$subscription_item
->SetItem($recurrent_item);
$item
->SetSubscription($subscription_item);
$cart
->AddItem($item);

echo $cart
->CheckoutButtonCode("MEDIUM");



As soon as I try to specify date to SetStartDate I get the dreaded and unhelpful "Oops We were unable to process your request." error 

$currency = "USD";    

$cart
= new GoogleCart(GOOGLEMERCHANTID, GOOGLEMERCHANTKEY, GOOGLESERVERTYPE, $currency);
$item
= new GoogleItem("Subscription", "one years access to bepublicloud", 1, 11.99);
$subscription_item
= new GoogleSubscription("google", "YEARLY", 11.99);

$startdate
= date('c', strtotime('+14 days'));
$subscription_item
->SetStartDate($startdate);

$recurrent_item
= new GoogleItem("fee", "recurring fee", 1, 11.99);
$subscription_item
->SetItem($recurrent_item);
$item
->SetSubscription($subscription_item);
$cart
->AddItem($item);

 echo $cart
->CheckoutButtonCode("MEDIUM");


I'm about ready to give up and switch back to PayPal.

Suggestions?

Thank-you in advance