public static function getRecurringProfile($profileID)
 {
     $paypal = new prestaPaypal(gcr::rootDir . 'plugins/prestaPaypalPlugin/sdk/lib');
     GCPurchasePaypal::initializePaypalCaller($paypal, gcr::paypalSandbox);
     $paypal->setProfileID($profileID);
     return $paypal->getRecurringProfile();
 }
 public function emailPurchaseInfo($product_info = null)
 {
     global $CFG;
     $course = $CFG->current_app->getCourse($this->my_purchase->getPurchaseTypeId());
     $mdl_course = $course->getObject();
     $product_info = "Course: {$mdl_course->fullname} ({$mdl_course->shortname})";
     parent::emailPurchaseInfo($product_info);
 }
 public function attemptPaypalTransaction()
 {
     $this->cc->setStartDate($this->start_date);
     $this->cc->setBillingPeriod($this->my_purchase->getBillCycle());
     $this->cc->setBillingFrequency($this->billing_frequency);
     $this->cc->setAutoBillOutstandingAmount($this->auto_bill_outstanding_amount);
     $this->cc->setProfileReference($this->my_purchase->getId());
     return parent::attemptPaypalTransaction();
 }
 public function emailPurchaseInfo($product_info = null)
 {
     $purchase_item = Doctrine::getTable('GcrPurchaseItem')->find($this->my_purchase->getPurchaseTypeId());
     $product_info = "Item: {$purchase_item->description}";
     parent::emailPurchaseInfo($product_info);
 }