Example #1
0
     $show_url = $INI['system']['wwwprefix'] . "/gift_cards/index.php";
     $subject = preg_replace('/[\\r\\n\\s]+/', '', strip_tags('Gift_Card'));
     $body = $show_url;
     $quantity = 1;
     $paypal = new Paypal();
     $paypal->add_field('business', $seller_acc);
     $paypal->add_field('notify_url', $notify_url);
     $paypal->add_field('return', $return_url);
     //$paypal->add_field('cancel_return', $show_url);
     //$paypal->add_field('transaction_subject', 'Paypal Transaction - test');
     $paypal->add_field('item_name', $subject);
     $paypal->add_field('item_number', $out_trade_no);
     $paypal->add_field('currency_code', $currency);
     $paypal->add_field('amount', $total_money);
     $paypal->add_field('txn_id', $out_trade_no);
     $sign = $paypal->submit_verify();
     include template('gift_pay');
 } else {
     if ($order['paytype'] == 'cash') {
         include template('gift_pay');
     } else {
         if ($order['paytype'] == 'migs') {
             $mid = $INI['migs']['mid'];
             $version = $INI['migs']['ver'];
             $type = $INI['migs']['type'];
             $accesscode = $INI['migs']['acc'];
             $ref = $INI['migs']['ref'];
             $locale = $INI['migs']['loc'];
             $returnURL = $INI['migs']['url'];
             include template('gift_pay');
         } else {