Changeset 1857630
- Timestamp:
- 04/13/2018 06:25:51 AM (8 years ago)
- Location:
- woo-bootpay/trunk
- Files:
-
- 3 edited
-
assets/js/bootpay-order.js (modified) (1 diff)
-
bootpay-woocommerce.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woo-bootpay/trunk/assets/js/bootpay-order.js
r1857603 r1857630 6 6 var paymentGatewayName = $('#order_review input[name=payment_method]:checked').val(); 7 7 if (bootpayGateways.indexOf(paymentGatewayName) === -1) return true; 8 9 var jsApiKey = wc_checkout_params.js_api_key; 10 if (jsApiKey === undefined || jsApiKey.length === 0) { 11 alert('Javascript API KEY를 입력해주세요.'); 12 return false; 13 } 14 15 $.ajax({ 16 type: 'POST', 17 url: wc_checkout_params.checkout_url, 18 data: $(this).serialize(), 19 dataType: 'json', 20 success: function (response) { 21 if (response.result !== 'success') { 22 alert('주문이 잘못되었습니다.'); 23 return; 24 } 25 26 var orderData = response.order_data; 27 BootPay.request({ 28 application_id: jsApiKey, 29 price: orderData.price, 30 name: orderData.name, 31 items: orderData.items, 32 phone: orderData.user_info.phone, 33 user_info: orderData.user_info, 34 order_id: orderData.order_id, 35 show_agree_window: wc_checkout_params.show_agree_window === 'yes' ? 1 : 0 36 }).error(function (data) { 37 console.log(data); 38 alert('결제가 실패하였습니다.'); 39 }).cancel(function (data) { 40 console.log(data); 41 alert('결제가 진행도중 취소되었습니다. 다시 시도해주세요.'); 42 }).ready(function (data) { 43 if (data.receipt_id !== undefined) { 44 location.href = response.checkout_url + '&receipt_id=' + data.receipt_id; 45 } else { 46 alert('결제가 정상적으로 처리 되지 않았습니다.'); 47 } 48 }).confirm(function (data) { 49 // TODO: 재고 처리 관리 로직을 넣어야 한다. 50 this.transactionConfirm(data); 51 }).done(function (data) { 52 // 결제 완료된 이후 처리 53 if (data.receipt_id !== undefined) { 54 location.href = response.checkout_url + '&receipt_id=' + data.receipt_id; 55 } else { 56 alert('결제가 정상적으로 처리 되지 않았습니다.'); 57 } 58 }).close(function (data) { 59 60 }); 61 }, 62 error: function (error) { 63 console.log(error); 64 } 65 }); 66 return false; 67 }); 68 69 $('form#order_review, form[name=checkout]').on('submit', function (e) { 70 var paymentGatewayName = $('#order_review input[name=payment_method]:checked').val(); 71 if (bootpayGateways.indexOf(paymentGatewayName) === -1) return true; 72 73 e.preventDefault(); 74 e.stopImmediatePropagation(); 75 8 76 var jsApiKey = wc_checkout_params.js_api_key; 9 77 if (jsApiKey === undefined || jsApiKey.length === 0) { -
woo-bootpay/trunk/bootpay-woocommerce.php
r1857621 r1857630 4 4 * Plugin URI: https://www.bootpay.co.kr 5 5 * Description: 우커머스에 PG를 손쉽게 붙일 수 연동 플러그인 ( 이니시스 / 다날 / KCP / LGU+ 모두 쉽게 붙이는 Woo-bootpay ) 6 * Version: 1. 0.96 * Version: 1.1.0 7 7 * Author: Gosomi 8 8 * Author URI: https://blog.areum.io -
woo-bootpay/trunk/readme.txt
r1857621 r1857630 5 5 Requires at least: 3.6 6 6 Tested up to: 4.9.1 7 Stable tag: 1. 0.97 Stable tag: 1.1.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.