</table> </div> <input type="hidden" name="orderid" value="<?php echo $data->ID; ?> " otype="<?php echo $data->Type; ?> " ostatus="<?php echo $data->Status; ?> "> </div> <?php $organID = Yii::app()->user->getOrganID(); $paycount = JpdFinancialPaypal::model()->find('OrganID=:organID', array(":organID" => $organID)); ?> <div style="float: right; margin:5px 20px 5px 0;"> <input type="hidden" id='pycount' value='<?php echo !empty($paycount['PaypalAccount']) ? $paycount['PaypalAccount'] : ''; ?> '> <button class="button2 button m-top" style="width:65px; margin-right: 5px" onclick="checkgo()">提交申请</button> <button class="button2 button m-top" style="width:65px" onclick="nocheckgo()">取消申请</button> </div> </div> <form action="" method="POST" id="goodsform" target="_blank"> <input type="hidden" name="Version"> <input type="hidden" name="Order"> </form> <script>
public function actionGetaccount() { $orderid = Yii::app()->request->getParam('orderid'); $order = PapOrder::model()->findByPk($orderid)->attributes; //获取卖家支付宝帐号 // $paypal = JpdFinancialPaypal::model()->find('OrganID=:ID ', array(':ID' => $order['SellerID'])); $account = JpdFinancialPaypal::model()->find('OrganID=:organID and Status=:stu', array(':organID' => $order['SellerID'], ':stu' => 0)); if (isset($account['PaypalAccount']) && !empty($account['PaypalAccount'])) { PapOrder::model()->UpdateByPk($orderid, array('AlipayTN' => 1)); echo json_encode(array('success' => 1)); } else { $message = $order['SellerName'] . ' ,还未设置收款支付宝帐号,暂时不能支付'; echo json_encode(array('failed' => $message)); } }
public static function dealerpaypal($returnID) { //申请退款 //获取订单信息 $order = PapReturnOrder::model()->findByPk($returnID)->attributes; $serviceID = $order['ServiceID']; //获取服务店支付宝帐号 $paypal = JpdFinancialPaypal::model()->find("OrganID=:ID", array(":ID" => $serviceID)); //获取服务店地址 $address = Organ::model()->findByPk($serviceID, 'IsDelete=0'); $payArr = array(); // $payArr['order_rs'] = "D-S"; $payArr['order_id'] = $order['ID']; //退货单ID $payArr['out_trade_no'] = $order['ReturnNO']; //退货单编号 $payArr['subject'] = '退货单编号:' . $order['ReturnNO']; //订单名称 $payArr['seller_email'] = $paypal['PaypalAccount']; //卖家(生产商)的支付宝账号 $payArr['body'] = ''; //订单描述 $payArr['price'] = $order['Price']; //退货总价 $payArr['logistics_fee'] = "0"; //物流费 $payArr['receive_name'] = $address['OrganName']; //收货人信息 $payArr['receive_address'] = Area::getCity($address['Province']) . Area::getCity($address['City']) . Area::getCity($address['Area']) . $address['Address']; $payArr['receive_phone'] = $address['Phone']; return $payArr; }
public static function getPayaccount() { $organID = Yii::app()->user->getOrganID(); $account = JpdFinancialPaypal::model()->find('OrganID=:organID and Status=:sta', array(':organID' => $organID, ':sta' => '0')); return $account; }