私は多数の e-comm サイトを複数の銀行に統合していますが、最も簡単な方法は dotnetcharge (www.dotnetcharge.com) ライブラリを追加することだと判断しました。これはうまく機能し、銀行の種類や取引ごとに多くのコードを同じに保つことができることを意味します。ただし、彼らのサポートは少しお粗末で (4 通のメールが送信され、1 通の返信)、3D セキュアの問題については完全に困惑しています。
dotnetcharge と 3D セキュアの経験がある人はいますか? MerchantURL を設定すると、実際の 3D セキュア画面が表示されますが、システムを適切に「フロー」させる方法がわかりません。誰かがコード例や正しい方向へのポインタを持っていますか? それができない場合、サポートを応答させる方法を知っている人はいますか?
この特定の統合は SagePay との統合であり、SagePay も非常にひどいドキュメントとサポートを備えています。
参照用のコードは次のとおりです。
Dim Amount As Decimal = ordertotal
' ApplySecure3D options:
' 0 = If 3D-Secure checks are possible and rules allow, perform the checks and apply the authorization rules.
' 1 = Force 3D-Secure checks for this transaction only (if your account is 3D-enabled) and apply rules for authorization.
' 2 = Do not perform 3D-Secure checks for this transaction only and always authorize.
' 3 = Force 3D-Secure checks for this transaction (if your account is 3D-enabled) but ALWAYS obtain an auth code, irrespective of rule base.
Dim ProtxLogin As String = "xxx"
Dim ProtxPassword As String = "xxx"
Dim ProtxApply3DSecure As Integer = 1
Dim ProtxMerchantURL As String = "https://www.mydomain.com/processing/"
Dim Number As String = txtCardNo.Text '//luhn/mod10 here.
Dim AVS As String = txtCVN.Text
Dim DD As String = "01"
Dim MM As String = ddlValidTo_month.SelectedValue.ToString()
Dim YY As String = ddlValidTo_year.SelectedValue.ToString()
Dim ProcessingResult As Integer = 0
Dim Protx As New dotnetCHARGE.CC()
Protx.Login = ProtxLogin
Protx.Password = ProtxPassword
Protx.ApplySecure3D = ProtxApply3DSecure
Protx.MerchantUrl = ProtxMerchantURL
Dim AVSResponse As String = ""
Dim CVV2 As String = ""
Protx.OrderID = GoogleOrderNumber
Protx.Month = MM
Protx.Year = YY
Protx.TransactionType = dotnetCHARGE.TransactionType.Sale
Protx.Amount = ordertotal
Protx.Number = Number
Protx.Currency = "GBP"
Protx.CustomerID = CustomerId
'//loads of params removed for brevity
Protx.ClientIP = Request.UserHostAddress.ToString()
Protx.CardType = ddlCardType.SelectedValue.ToString()
Protx.Description = "My Order"
Protx.Code = AVS
Protx.TestMode = True
Protx.TransactionType = dotnetCHARGE.TransactionType.Sale
ProcessingResult = Protx.Charge(Processor.Protx)
助けていただければ幸いです。