コード例 #1
0
ファイル: paypal.php プロジェクト: kosmosby/medicine-prof
 protected function preparePostVars($orderInfo)
 {
     $prepare = array();
     $pConfig = oseMscConfig::getConfig('payment', 'obj');
     $prepare['paypal_email'] = $pConfig->paypal_email;
     $prepare['test_mode'] = $pConfig->paypal_testmode;
     if ($prepare['test_mode']) {
         $url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
     } else {
         $url = "https://www.paypal.com/cgi-bin/webscr";
     }
     $prepare['url'] = $url;
     $member = oseRegistry::call('member');
     $member->instance($orderInfo->user_id);
     $billinginfo = $member->getBillingInfo('obj');
     $amount = $orderInfo->payment_price;
     $currency = $orderInfo->payment_currency;
     $order_id = $orderInfo->order_id;
     $order_number = $orderInfo->order_number;
     //$billinginfo = OSEPAYMENTS::get_billinginfo($user_id);
     $user =& JFactory::getUser($orderInfo->user_id);
     $desc = parent::generateDesc($order_id);
     $msc_name = $desc;
     return $prepare;
 }
コード例 #2
0
 function __construct()
 {
     parent::__construct();
 }
コード例 #3
0
ファイル: eway.php プロジェクト: kosmosby/medicine-prof
 function CreateProfile($params = array())
 {
     ini_set('max_execution_time', '180');
     $orderInfo = $this->orderInfo;
     $billingInfo = parent::getBillingInfo($orderInfo->user_id);
     // First time charge for those does not support initial payments;
     // SUITABLE HERE - eWay;
     //$result = $this->eWayOneOffPay($TransactionType='AUTH_CAPTURE', true);
     $result = $this->createBillCustomer($billingInfo);
     if ($result['Result'] == 'Success') {
         $RebillCustomerID = $result['RebillCustomerID'];
         $this->orderInfo = $this->updateOrderParams($orderInfo, array('RebillCustomerID' => $RebillCustomerID));
         $resArray = $this->createRebill($RebillCustomerID);
         if ($resArray['Result'] == 'Success') {
             $RebillID = $resArray['RebillID'];
             return $this->confirmOrder($orderInfo->order_id, array('payment_serial_number' => $RebillID));
         } else {
             return $this->getErrorMessage('cc', '0004', $resArray['ErrorDetails']);
         }
     } else {
         return $this->getErrorMessage('cc', '0004', $result['ErrorDetails']);
     }
 }