Delphi 連接 SSL TLS 1.2 第三方支付金流問題

台灣最近銀行與第三方支付、行動支付發展越來越快,而Delphi使用indy元件時,如果處理SSL網站時不是很容易。
後來找到了ipwork的元件還不錯用。
列一下關鍵的程式

  ipwhttp1 := Tipwhttp.Create(Application);
 ipwhttp1.Config('CodePage=65001');
 posturl:=posturl+'barcode='+sBarcode;
 ipwhttp1.Post(sPaymentURL+'?'+posturl); 
 result:=UTF8ToString(ipwhttp1.TransferredData);
  ipwhttp1.free;

另外處理像SHA/AES等加解密也很方便

function GetTokenKey(s:String):String;
var ipcHash1: TipcHash;
begin
  ipcHash1 := TipcHash.Create(Application);
  ipcHash1.Reset();
  ipcHash1.Algorithm := TipcHashAlgorithms(haSHA256);
  ipcHash1.InputMessage := s;    
  ipcHash1.ComputeHash();
  result :=lowercase(ipcHash1.HashValue);
  ipcHash1.Free;
end;

Delphi 推出社群版本(Community Edition)


Delphi推出了全新的社群版本(Community Edition),不像先前的starter版本。而是專業版加上iOS/Android功能。如果寫開放源始碼/免費軟體都可以,商業版的話限制為
1年收入不超過5000美金(約15萬台幣)
2成員不超過5人

 

延伸閱讀:

Learn to Program with Community Edition

Introducing Delphi and C++Builder Community Edition

終於完成了Delphi XE 10.2.3的升級 感謝embarcadero及台灣QCom


今年3月份embarcadero發佈10.2.3升級後,卻發生一直無法正常解除10.2.2的問題,後來求助台灣QCom捷康的幫忙後也無法解決,台灣捷康幫忙與總部聯繫。在連假第三天終於解決了!感謝台灣捷康Eddie Chang以及embarcadero support。

相關資源:
https://community.embarcadero.com/
www.qcomgroup.com.tw
https://community.embarcadero.com/article/articles-support/174-rad-studio/installation-registration/16501-manual-uninstall-of-rad-studio-delphi-c-builder-10-2

RAD Studio 10.2.1 Release 1出爐了!

父親節Embarcadero捎來了一份禮物,在官方部落格上宣布RAD Studio 10.2.1 Release1可以下載了(RAD Studio 10.2.1 Released Today),主要當然是一些bug fix外,也多了一些功能。

    • Delphi Linux server performance enhancements for both RAD Server and DataSnap.

    1. Delphi and C++ compiler and linker updates that resolve issues loading packages, especially when debugging, on Windows 10 Creators Update.

    1. Support for latest versions of iOS and Xcode (iOS 10.3 and XCode 8.3.2) when targeting the iOS App Store.

    1. FireDAC support for MSSQL 2012, 2014, 2016, and ODBC Driver 13.

    1. Significant C++ linker improvements pertaining to linking larger projects.

    1. Fixes and enhancements to the Runtime Library and VCL.

    1. Additional Android enhancements around control rendering and performance, and fixes for TEdit issues with Android N.

    1. FireDAC Support for InterBase 2017 Exclusive Isolation Level and Transaction Wait Time.

    1. Changes in DataSize for fields of type ftInteger and ftLongWord to avoid using the platform-dependent LongInt and LongWord type (the change affects only 64-bit Linux and 64-bit iOs platforms), and related changes for SetFieldData and GetFieldData

    Fixes for over 140 issues reported by customers in Quality Portal.

樹莓派(Raspberry)建置Lazarus(Linux版Delphi)環境

cmd模式 arp-a
B8-27-EB是Raspberry Pi的MAC起始位址
透過putty連入(預設帳密 pi/raspberry)
sudo apt-get update 更新
sudo apt-get -y install xrdp 安裝遠端桌面
sudo apt-get update 取得遠端更新伺服器的套件檔案清單
sudo apt-get -y install fpc 安裝FreePascalComplier
sudo apt-get -y install lazarus 安裝Linux上的免費Delphi開發工具 Lazarus