Skip to content

Commit

Permalink
修正金流付款異常問題
Browse files Browse the repository at this point in the history
  • Loading branch information
AllennChang committed May 27, 2019
1 parent f853f79 commit 0544c7d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
Expand Up @@ -21,7 +21,7 @@
$_['ecpaypayment_text_failure_comment'] = 'Paid Failed, Error : %s';
$_['ecpaypayment_text_state_error'] = 'The order state is error, stop updating state';
$_['ecpaypayment_text_simulate_paid'] = 'Simulate paid, update the note only';

$_['ecpayinvoice_text_title'] = 'ECPay Invoice';
// Entry
$_['ecpaypayment_entry_payment_method'] = 'Payment Method:';

Expand Down
Expand Up @@ -21,11 +21,11 @@
$_['ecpaypayment_text_failure_comment'] = '付款失敗, 錯誤訊息:%s';
$_['ecpaypayment_text_state_error'] = '訂單狀態錯誤,不更新訂單狀態。';
$_['ecpaypayment_text_simulate_paid'] = '模擬付款,僅更新備註。';

$_['ecpayinvoice_text_title'] = '綠界電子發票';
// Entry
$_['ecpaypayment_entry_payment_method'] = '付款方式:';

// Error
$_['ecpaypayment_error_payment_missing'] = '遺失付款方式。';
$_['ecpaypayment_error_invalid_payment'] = '無效的付款方式。';
$_['ecpaypayment_error_order_id_miss'] = '訂單編號遺失。';
$_['ecpaypayment_error_order_id_miss'] = '訂單編號遺失。';
Expand Up @@ -2,7 +2,7 @@
<table class="table table-bordered table-hover">
<thead>
<tr>
<th colspan="2" class="text-center">{{ text_title }}</th>
<th colspan="2" class="text-center">{{ ecpaypayment_text_title }}</th>
</tr>
</thead>
<tbody>
Expand All @@ -29,7 +29,7 @@
<table class="table table-bordered table-hover">
<thead>
<tr>
<th colspan="2" class="text-center">{{ ecpay_invoce_text_title }}</th>
<th colspan="2" class="text-center">{{ ecpayinvoice_text_title }}</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -68,21 +68,30 @@
<script type="text/javascript">
$(document).ready(function() {
$("#payment-ecpaypayment-choose-payment").change(function() {
var ecpayPaymentRadio = $("input:radio[value=\"{{ module_name }}\"]:checked");
var postUrlParent = 'index.php?route=extension/payment/{{ module_name }}/';
var postUrl = '';
var postData = '';
if (ecpayPaymentRadio.length > 0) {
// save chosen payment
var chosenPayment = $("#{{ id_prefix }}-choose-payment").find(":selected").val();
postUrl = postUrlParent + 'savePayment';
postData = 'cp=' + chosenPayment;
} else {
// clean ECPay session
postUrl = postUrlParent + 'cleanSession';
}
// save chosen payment
var chosenPayment = $("#{{ id_prefix }}-choose-payment").find(":selected").val();
postUrl = postUrlParent + 'savePayment';
postData = 'cp=' + chosenPayment;
var response = simpleAjax(postData, postUrl);
});
// $('input[type=radio][name=payment_method]').change(function() {
// var postUrlParent = 'index.php?route=extension/payment/{{ module_name }}/';
// var postUrl = '';
// var postData = '';
// if (this.value != 'ecpaypayment') {
// postUrl = postUrlParent + 'cleanSession';
// var response = simpleAjax(postData, postUrl);
// }
// });
});
// Simple Ajax
Expand Down
Binary file modified ecpaypayment.ocmod.zip
Binary file not shown.

0 comments on commit 0544c7d

Please sign in to comment.