2011-11-22 13 views
6

मेरे पास एक प्रोजेक्ट है जिसमें मुझे पीओएस - टर्मिनल डिवाइस और चुंबकीय/चिप कार्ड के साथ बातचीत करने की आवश्यकता है। मान लीजिए, जब भी ग्राहक मेरे डिपार्टमेंट स्टोर से माल खरीदता है, तो इस स्टोर के कर्मचारी ग्राहक के वित्तीय कार्ड पट्टी करेंगे और भुगतान लेनदेन करेंगे।पीओएस के साथ बातचीत - टर्मिनल डिवाइस और बैंकिंग स्विचिंग सिस्टम

उन इसी तरह की प्रणाली के लिए, मंचों से ज्यादातर का कहना है कि यह इस तरह के रूप तृतीय पक्ष एपीआई का उपयोग करने पर विचार करना चाहिए:

  • पेपैल
  • ब्रेनट्री
  • Authorize.NET।
  • Google चेक-आउट API।

लेकिन मुझे लगता है कि उन एपीआई को उन प्रकार के सिस्टम के लिए उपयोग करना चाहिए जो अंतरराष्ट्रीय भुगतान प्रक्रिया में जाएंगे। मेरे लिए, मुझे लगता है कि मेरा सिस्टम अंतरराष्ट्रीय भुगतान प्रसंस्करण जितना बड़ा नहीं है और घरेलू लघु प्रणाली के रूप में काम करना शुरू कर देगा।

तो मैं क्या जानना चाहता हूं कि कौन सा सबसे अच्छा समाधान होगा और सिस्टम आर्किटेक्चर कैसा होगा?

जब मैं Authorize.Net पृष्ठ पढ़ता हूं, तो मुझे क्रेडिट कार्ड प्रसंस्करण का दिनचर्या मिला।

  • मैं कोई फर्क नहीं पड़ता कि क्या अपने प्रोजेक्ट, या बड़ा या छोटा अंतरराष्ट्रीय चल रहा हो या घरेलू चल रहा है इस पूरी प्रक्रिया का पालन करने की जरूरत है?

  • क्या मुझे वास्तव में पीओएस - टर्मिनल डिवाइस के साथ भुगतान प्रक्रिया करने के लिए इस प्रक्रिया का पालन करने की आवश्यकता है?

एक बात मुझे पता है कि ISO 8583 आवश्यक वित्तीय मैसेजिंग प्रोटोकॉल है, क्योंकि बैंकिंग स्विचिंग सॉफ्टवेयर प्रणाली के अधिकांश, मेरे क्षेत्र के लिए, केवल इन मैसेजिंग स्वरूप का उपयोग है। इसका मतलब है कि मैं अन्य संदेश प्रारूप जैसे एनडीसी या डी 9 12 का उपयोग नहीं कर सकता।

उत्तर

5

Authorize.net का उपयोग करना बहुत आसान है। कार्ड को संसाधित करने के लिए आपको बस इतना करना है कि एक्सएमएल प्रारूप में एक https पोस्ट भेजना है। Authorize.net डेवलपर साइट पर कई उदाहरण हैं। जहां तक ​​कार्ड स्वाइप करते हैं, अधिकांश कार्ड पाठक कुंजीपटल प्रेस का अनुकरण करते हैं।

'%B5500692805076849^SMITH/STEPHEN A^12041010000000  00969000000?;5500692805076849=12041010000000969?` 

तो कार्ड नंबर "5500692805076849", नाम "स्मिथ/स्टीफन ए 'और समाप्ति तिथि" 1204 " पार्स और Authorize.net

Private Sub cmdCharge_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCharge.Click 
    ' By default, this sample code is designed to post to our test server for 
    ' developer accounts: https://test.authorize.net/gateway/transact.dll 
    ' for real accounts (even in test mode), please make sure that you are 
    ' posting to: https://secure.authorize.net/gateway/transact.dll 
    cmdCharge.Enabled = False 
    lblResponse.Text = "Processing....." 
    Application.DoEvents() 
    Dim post_url 
    post_url = "https://test.authorize.net/gateway/transact.dll" 

    Dim post_values As New Dictionary(Of String, String) 

    'the API Login ID and Transaction Key must be replaced with valid values 
    post_values.Add("x_login", "XXXXXXX") 
    post_values.Add("x_tran_key", "XXXXXXXXX") 
    'post_values.Add("x_test_request", "TRUE") 
    post_values.Add("x_delim_data", "TRUE") 
    post_values.Add("x_delim_char", "|") 
    post_values.Add("x_relay_response", "FALSE") 

    post_values.Add("x_type", "AUTH_CAPTURE") 
    post_values.Add("x_method", "CC") 
    post_values.Add("x_card_num", txtCard.Text) 
    post_values.Add("x_exp_date", txtExp.Text) 

    post_values.Add("x_amount", txtAmount.Text) 
    'post_values.Add("x_description", "Sample Transaction") 

    post_values.Add("x_first_name", txtFirst.Text) 
    post_values.Add("x_last_name", txtLast.Text) 
    'post_values.Add("x_address", "1234 Street") 
    'post_values.Add("x_state", "WA") 
    post_values.Add("x_zip", txtZip.Text) 
    post_values.Add("x_card_code", txt3CV.Text) 

    ' Additional fields can be added here as outlined in the AIM integration 
    ' guide at: http://developer.authorize.net 

    ' This section takes the input fields and converts them to the proper format 
    ' for an http post. For example: "x_login=username&x_tran_key=a1B2c3D4" 
    Dim post_string As String = "" 
    For Each field As KeyValuePair(Of String, String) In post_values 
     post_string &= field.Key & "=" & field.Value & "&" 
    Next 
    ' post_string = Left(post_string, Len(post_string) - 1) 
    post_string = post_string.Substring(0, Len(post_string) - 1) 

    ' create an HttpWebRequest object to communicate with Authorize.net 
    Dim objRequest As HttpWebRequest = CType(WebRequest.Create(post_url), HttpWebRequest) 
    objRequest.Method = "POST" 
    objRequest.ContentLength = post_string.Length 
    objRequest.ContentType = "application/x-www-form-urlencoded" 

    ' post data is sent as a stream 
    Dim myWriter As StreamWriter = Nothing 
    myWriter = New StreamWriter(objRequest.GetRequestStream()) 
    myWriter.Write(post_string) 
    myWriter.Close() 

    ' returned values are returned as a stream, then read into a string 
    Dim objResponse As HttpWebResponse = CType(objRequest.GetResponse(), HttpWebResponse) 
    Dim responseStream As New StreamReader(objResponse.GetResponseStream()) 
    Dim post_response As String = responseStream.ReadToEnd() 
    responseStream.Close() 

    ' the response string is broken into an array 
    Dim response_array As Array = Split(post_response, post_values("x_delim_char"), -1) 

    ' the results are output to the screen in the form of an html numbered list. 
    Select Case response_array(0) 

     Case "1" 'Approved 
      lblResponse.Text = "Transaction Approved. " & vbCrLf & response_array(4) 

     Case "2" 'Declined 
      lblResponse.Text = "Transaction Declined. " & vbCrLf & response_array(3) 

     Case "3" 'Error 
      lblResponse.Text = "Transaction Error. " & vbCrLf & response_array(3) 

     Case "4" 'Held for Review 
      lblResponse.Text = "Transaction Held. " & vbCrLf & response_array(3) 

    End Select 

    ' individual elements of the array could be accessed to read certain response 
    ' fields. For example, response_array(0) would return the Response Code, 
    ' response_array(2) would return the Response Reason Code. 
    ' for a list of response fields, please review the AIM Implementation Guide 

    cmdCharge.Enabled = True 
End Sub 
पर उन पारित: एक स्वाइप कार्ड इस के समान दिखता है
संबंधित मुद्दे