使用方法
開啟Ocaml
複製下面的code
接著輸入
startSimplize 字串
即可處理
#特殊的require 可以輕鬆使用參數 | |
### read argument | |
require 'optparse' | |
$options = {} | |
OptionParser.new do |opts| | |
opts.on("-r") { |s| $options[:r] = true } | |
opts.on("-i", '-i INPUT', "input ") { |s| $options[:i] = s } # ./queries/origin/query-5.xml | |
opts.on("-o", '-o OUTPUT',"output") { |s| $options[:o] = s } # ans | |
opts.on("-m", '-m MODEL', "model ") { |s| $options[:m] = s } # ./model-files |
####mysql2 出錯
sudo apt-get install libmysql-ruby libmysqlclient-dev
####rails command line一個指令安裝
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled # Or, --ruby=1.9.3
2 2 | |
5 0 | |
+ | |
4 -4 | |
6 2 | |
-6 -2 | |
+ | |
-3 1 | |
* | |
5 1 |
public static boolean verify(WORequest r) { | |
// request all post argument | |
HashMap<String, String> myMap = new HashMap<String, String>(); | |
if(HypoUtility.safeTrim(r.stringFormValueForKey("MerchantID")).equals(MERCHANT_ID)){ | |
myMap.put("MerchantID", MERCHANT_ID); | |
} else{ | |
log.info("allpayAlipay MerchantID is not Our ID"); | |
return false; | |
} | |
myMap.put("MerchantTradeNo", HypoUtility.safeTrim(r.stringFormValueForKey("MerchantTradeNo")) ); |
<form method="post" action="https://payment.allpay.com.tw/Cashier/AioCheckOut"> | |
<input type="hidden" value="1047153" name="MerchantID"> | |
<input type="hidden" value="hypoOnlieTest2Product25215" name="MerchantTradeNo"> | |
<input type="hidden" value="2015/02/10 13:58:34" name="MerchantTradeDate"> | |
<input type="hidden" name="PaymentType" value="aio"> | |
<input type="hidden" value="1425" name="TotalAmount"> | |
<input type="hidden" name="TradeDesc" value="hypoProduct"> | |
<input type="hidden" value="LHB8" name="ItemName"> | |
<input type="hidden" name="ChoosePayment" value="Alipay"> |
2B432B9057D0439F5C3B357ED8D8B2BA | |
2/5 | |
6d19c95351f3d23b468036a9352cc86b | |
2/10 | |
- allALipayCallBack: {PaymentType = ("Alipay_Alipay"); MerchantID = ("1047153"); TradeAmt = ("1425"); TradeNo = ("1502101527144625"); CheckMacValue = ("361FAD9EA40779CDD7A94D123156244C"); SimulatePaid = ("1"); TradeDate = ("2015/02/10 15:27:14"); PaymentDate = ("2015/02/10 15:27:43"); RtnMsg = ("付款成功"); RtnCode = ("1"); PaymentTypeChargeFee = ("0.0000"); MerchantTradeNo = ("hypoOnlieTest5Produc"); } |
為何一直無法接收到交易成功後的回傳參數? | |
請確認以下部分: | |
1.網址的部分,必須使用正式合法的Domain Name,不可使用IP位址。 | |
2.因資安政策的因素,目前port的部分,必須設定為80 或443。 |
def firstchar(text) | |
return text.split(" ").map{ |c| c[0] }.reduce(:+) | |
end |