コード例 #1
0
ファイル: paypal.php プロジェクト: ugurbastan/swe-574-group4
 private function handle_pdt($order, $options)
 {
     // Check if it looks like a PDT transaction
     if (APP_Paypal_PDT::can_be_handled()) {
         if (APP_Paypal_PDT::is_valid_transaction($order, $options)) {
             $this->complete_order($order);
         } else {
             $this->fail_order(__('PayPal has responded to your transaction as invalid. Please contact site owner.', APP_TD));
         }
     } else {
         $this->display_form($order, $options);
     }
 }
コード例 #2
0
ファイル: paypal.php プロジェクト: TopLineMediaTeam/horseshow
 /**
  * Processes an Order Payment
  * See APP_Gateway::process()
  * @param  APP_Order $order   Order to process
  * @param  array $options     User inputted options
  * @return void
  */
 public function process($order, $options)
 {
     if (!empty($options['pdt_enabled'])) {
         if (APP_Paypal_PDT::can_be_handled()) {
             $transaction = APP_Paypal_PDT::get_transaction($_GET['tx'], $options['pdt_key'], !empty($options['sandbox_enabled']));
             if ($transaction) {
                 $this->bridge->process_single($transaction);
             } else {
                 $this->fail_order(__('PayPal has responded to your transaction as invalid. Please contact site owner.', APP_TD));
             }
         } else {
             $this->create_form($order, $options);
         }
         return;
     }
     // Otherwise, validate regularly
     if ($this->is_returning()) {
         $order->complete();
     } else {
         $this->create_form($order, $options);
     }
 }
コード例 #3
0
 public static function init($options)
 {
     self::$options = $options;
 }