1
This commit is contained in:
@@ -3253,24 +3253,33 @@ class Article extends Base
|
|||||||
$user_rev_info = $this->user_reviewer_info_obj->where("reviewer_id", $user_res['user_id'])->find();
|
$user_rev_info = $this->user_reviewer_info_obj->where("reviewer_id", $user_res['user_id'])->find();
|
||||||
//发送邮件给作者,表示感谢
|
//发送邮件给作者,表示感谢
|
||||||
$tt_t = 'Dear Dr. ' . ($user_res['realname'] == '' ? $user_res['account'] : $user_res['realname']) . ',<br><br>';
|
$tt_t = 'Dear Dr. ' . ($user_res['realname'] == '' ? $user_res['account'] : $user_res['realname']) . ',<br><br>';
|
||||||
$tt1 = 'Thank you for submitting your manuscript entitled "' . $article_info['title'] . '". Your submission has been assigned the following tracking number:' . $article_info['accept_sn'] . '. We will be in touch again as soon as we have reached a decision. Please quote the tracking number in any communication. This e-mail simply acknowledges receipt of your submission. If the editors decide for editorial reasons that the paper is unsuitable for publication in ' . $journal_info['title'] . ', you will be informed as soon as possible.<br><br><br>';
|
|
||||||
// if ($journal_info['journal_id'] == 9) { //life research 期刊发送收到文章邮件
|
if($article_info['journal_id']==1){
|
||||||
// $tt1 .= 'Life Research applies the CC BY-NC 4.0 license. Full details of the policy can be found at https://www.tmrjournals.com/notice.html?J_num=14&footer_id=123. Authors should read Guide to Authors carefully before submitting.<br><br>';
|
$tt1 = 'Thank you for submitting your manuscript entitled "' . $article_info['title'] . '". Your submission has been assigned the following tracking number: ' . $article_info['accept_sn'] . '. We will be in touch again as soon as we have reached a decision. You may check on the status of this manuscript in the Submission System. Please quote the tracking number in any communication.<br/><br/>';
|
||||||
// $tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact liferes@tmrjournals.com.<br><br>';
|
$tt1 .= 'The following information was acknowledged during the submission process: Traditional Medicine Research is an open access journal that charges a publication fee of 600 USD for accepted manuscripts (<a href="https://www.tmrjournals.com/apc/">click here</a> for details).<br/><br/>';
|
||||||
// $tt1 .= 'Thank you for choosing to submit your manuscript to Life Research.<br><br><br>';
|
$tt1 .= 'This e-mail simply acknowledges receipt of your submission. If the editors decide for editorial reasons that the paper is unsuitable for publication in Traditional Medicine Research, you will be informed as soon as possible.<br/><br/>';
|
||||||
// $tt1 .= 'Yours sincerely,<br>Haoran Zhang<br><br>';
|
$tt1 .= 'If you encounter any problems, please contact tmr@tmrjournals.com.<br/><br/>Thank you for choosing to submit your manuscript to Traditional Medicine Research.<br/><br/><br/>';
|
||||||
// $tt1 .= 'Manuscript Administration, Life Research<br>https://www.tmrjournals.com/lr/';
|
$tt1 .= 'Sincerely,<br/>Editorial Office<br/>';
|
||||||
// } else { //其他期刊发送邮件
|
$tt1 .= $journal_info['title'] . '<br>';
|
||||||
$tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact ' . $journal_info['email'] . '.<br><br>';
|
$tt1 .= 'Email: ' . $journal_info['email'] . '<br>';
|
||||||
$tt1 .= 'Thank you for choosing to submit your manuscript to ' . $journal_info['title'] . '.<br><br><br>';
|
$tt1 .= 'Website: ' . $journal_info['website'] . '<br>';
|
||||||
$tt1 .= 'Sincerely,<br>Editorial Office<br>';
|
$tt1 .= '<hr/>If you have any questions, please contact us: <br>';
|
||||||
$tt1 .= '<a href="https://www.tmrjournals.com/draw_up.html?issn=' . $journal_info['issn'] . '">Subscribe to this journal</a><br>';
|
$tt1 .= 'Head of publication ethics<br>Dr. Dan Chen<br>TMR Publishing Group Limited Company, Auckland, New Zealand<br>Email: publication.ethics@tmrjournals.com';
|
||||||
$tt1 .= $journal_info['title'] . '<br>';
|
|
||||||
$tt1 .= 'Email: ' . $journal_info['email'] . '<br>';
|
}else{
|
||||||
$tt1 .= 'Website: ' . $journal_info['website'] . '<br>';
|
$tt1 = 'Thank you for submitting your manuscript entitled "' . $article_info['title'] . '". Your submission has been assigned the following tracking number:' . $article_info['accept_sn'] . '. We will be in touch again as soon as we have reached a decision. Please quote the tracking number in any communication. This e-mail simply acknowledges receipt of your submission. If the editors decide for editorial reasons that the paper is unsuitable for publication in ' . $journal_info['title'] . ', you will be informed as soon as possible.<br><br><br>';
|
||||||
$tt1 .= '<hr/>If you have any questions, please contact us: <br>';
|
$tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact ' . $journal_info['email'] . '.<br><br>';
|
||||||
$tt1 .= 'Head of publication ethics<br>Dr. Dan Chen<br>TMR Publishing Group Limited Company, Auckland, New Zealand<br>Email: publication.ethics@tmrjournals.com';
|
$tt1 .= 'Thank you for choosing to submit your manuscript to ' . $journal_info['title'] . '.<br><br><br>';
|
||||||
// }
|
$tt1 .= 'Sincerely,<br>Editorial Office<br>';
|
||||||
|
$tt1 .= '<a href="https://www.tmrjournals.com/draw_up.html?issn=' . $journal_info['issn'] . '">Subscribe to this journal</a><br>';
|
||||||
|
$tt1 .= $journal_info['title'] . '<br>';
|
||||||
|
$tt1 .= 'Email: ' . $journal_info['email'] . '<br>';
|
||||||
|
$tt1 .= 'Website: ' . $journal_info['website'] . '<br>';
|
||||||
|
$tt1 .= '<hr/>If you have any questions, please contact us: <br>';
|
||||||
|
$tt1 .= 'Head of publication ethics<br>Dr. Dan Chen<br>TMR Publishing Group Limited Company, Auckland, New Zealand<br>Email: publication.ethics@tmrjournals.com';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sendEmail($user_res['email'], $journal_info['title'], $journal_info['title'], $tt_t . $tt1, $journal_info['email'], $journal_info['epassword']);
|
sendEmail($user_res['email'], $journal_info['title'], $journal_info['title'], $tt_t . $tt1, $journal_info['email'], $journal_info['epassword']);
|
||||||
|
|
||||||
|
|||||||
@@ -192,18 +192,18 @@ class Auto extends Base
|
|||||||
|
|
||||||
|
|
||||||
public function reviewerRepeat(){
|
public function reviewerRepeat(){
|
||||||
$repeats = $this->article_reviewer_repeat_obj->where("ctime","<",(time()-24*5*3600))->where("state",0)->select();
|
$repeats = $this->article_reviewer_repeat_obj->where("ctime","<",(time()-24*5*3600))->where("state",0)->delete(true);
|
||||||
foreach ($repeats as $v){
|
// foreach ($repeats as $v){
|
||||||
$ca_rev_info = $this->article_reviewer_obj->where('art_rev_id',$v['art_rev_id'])->find();
|
// $ca_rev_info = $this->article_reviewer_obj->where('art_rev_id',$v['art_rev_id'])->find();
|
||||||
if($ca_rev_info['state']==2){
|
// if($ca_rev_info['state']==2){
|
||||||
$com = 2;
|
// $com = 2;
|
||||||
}elseif($ca_rev_info['state']==1){//大修的复审不需要做处理
|
// }elseif($ca_rev_info['state']==1){//大修的复审不需要做处理
|
||||||
continue;
|
// continue;
|
||||||
}else{
|
// }else{
|
||||||
$com = 1;
|
// $com = 1;
|
||||||
}
|
// }
|
||||||
$this->article_reviewer_repeat_obj->where('art_rev_rep_id',$v['art_rev_rep_id'])->update(["recommend"=>$com,"stime"=>time(),"state"=>1]);
|
// $this->article_reviewer_repeat_obj->where('art_rev_rep_id',$v['art_rev_rep_id'])->update(["recommend"=>$com,"stime"=>time(),"state"=>1]);
|
||||||
}
|
// }
|
||||||
echo "done";
|
echo "done";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,10 @@ class Order extends base{
|
|||||||
return jsonError("Paystation responds with no results or result fail");
|
return jsonError("Paystation responds with no results or result fail");
|
||||||
}
|
}
|
||||||
$tid = $data['transaction_id'];
|
$tid = $data['transaction_id'];
|
||||||
$paystation_info = $this->paystation_obj->where("transaction_id",$tid);
|
$paystation_info = $this->paystation_obj->where("transaction_id",$tid)->find();
|
||||||
|
if (!$paystation_info){
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}
|
||||||
$order_info = $this->order_obj->where("ps_id",$paystation_info['ps_id'])->find();
|
$order_info = $this->order_obj->where("ps_id",$paystation_info['ps_id'])->find();
|
||||||
$this->article_obj->where("article_id",$order_info['article_id'])->update(['is_buy'=>1]);
|
$this->article_obj->where("article_id",$order_info['article_id'])->update(['is_buy'=>1]);
|
||||||
$this->order_obj->where("order_id",$order_info['order_id'])->update(['state'=>1]);
|
$this->order_obj->where("order_id",$order_info['order_id'])->update(['state'=>1]);
|
||||||
@@ -173,9 +176,21 @@ class Order extends base{
|
|||||||
$re['paystation'] = null;
|
$re['paystation'] = null;
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}else{
|
}else{
|
||||||
$re['detail'] = $check;
|
|
||||||
$re['paypal'] = null;
|
$re['paypal'] = null;
|
||||||
$re['paystation'] = $check['ps_id']==0?null:$this->paystation_obj->where("ps_id",$check['ps_id'])->find();
|
$paystation_res = $this->creatPaystation($article_info['article_id']);
|
||||||
|
$ps_insert['transaction_id'] = $paystation_res['transaction_id'];
|
||||||
|
$ps_insert['session_id'] = $paystation_res['session_id'];
|
||||||
|
$ps_insert['paystation_id'] = $paystation_res['paystation_id'];
|
||||||
|
$ps_insert['currency'] = $paystation_res['currency'];
|
||||||
|
$ps_insert['amount'] = $paystation_res['amount'];
|
||||||
|
$ps_insert['merchant_session'] = $paystation_res['merchant_session'];
|
||||||
|
$ps_insert['request_time'] = $paystation_res['request_time'];
|
||||||
|
$ps_insert['payment_url'] = $paystation_res['payment_url'];
|
||||||
|
$ps_insert['data'] = json_encode($paystation_res);
|
||||||
|
$ps_id = $this->paystation_obj->insertGetId($ps_insert);
|
||||||
|
$this->order_obj->where("order_id",$check['order_id'])->update(['ps_id'=>$ps_id,"paystation_url"=>$paystation_res['payment_url']]);
|
||||||
|
$re['paystation'] = $this->paystation_obj->where("ps_id",$ps_id)->find();
|
||||||
|
$re['detail'] =$this->order_obj->where("order_id",$check['order_id'])->find();
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,6 +262,27 @@ class Order extends base{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function creatPaystation($article_id){
|
||||||
|
$article_info = $this->article_obj->where("article_id",$article_id)->find();
|
||||||
|
$journal_info = $this->journal_obj->where("journal_id",$article_info['journal_id'])->find();
|
||||||
|
$ca_sn = 'TMR'.date('Ymd') . strtoupper(bin2hex(random_bytes(8)));
|
||||||
|
$accessToken = createPayStationToken();
|
||||||
|
$data_array = [
|
||||||
|
'paystation_id' => Env::get("paystation.client_id"),
|
||||||
|
'gateway_id' => "PAYSTATION",//GATEWAY_ID,
|
||||||
|
"merchant_session" => $ca_sn,
|
||||||
|
"merchant_reference"=>$ca_sn,
|
||||||
|
"amount" =>(int)((((int)$journal_info['fee'])*726/416)*100),
|
||||||
|
"return_url"=>"https://submission.tmrjournals.com/success?id=".$article_info['article_id'],
|
||||||
|
"response_url"=>"http://api.tmrjournals.com/public/index.php/api/Order/completePaystation"
|
||||||
|
];
|
||||||
|
$data = json_encode($data_array);
|
||||||
|
$purchase = postPayStationQuery('v1/hosted/purchases', $accessToken, $data);
|
||||||
|
$paystation_res = object_to_array(json_decode($purchase));
|
||||||
|
return $paystation_res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getUserOrder(){
|
public function getUserOrder(){
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
|
|||||||
Reference in New Issue
Block a user