Precautions for the development of CCB's online banking interface

Source: Internet
Author: User

The development process of China Construction Bank online banking is not complicated, but it is often caused by exceptions during deployment. It is actually a problem when instantiating ccbrsa. rsasig RSA = new ccbrsa. rsasigclass.

Retrieving the com class factory for component with clsid {A5C5C388-A972-4CCF-93E2-7F97E82C9EBA} failed due to the following error: 80040154.

Sometimes the above errors are prompted, and sometimes there are some other errors. Because the dynamic link library file ccbrsa. dll is used, you must register this file first,

 

Here is a brief description of the steps:

1. register the ccbrsa. dll file. We recommend that you copy this file to the System32 directory and register regsvr32 ccbrsa. DLL)

2. Install msjavx86.exe on the Java Virtual Machine. Some of them may need to be called to some java libraries, so you need to install this. Note that you need to confirm the installed version,Preferably 5.0.20.2At the beginning, I downloaded the version 5.0.3810, so it never worked. I don't know if it's just me. Others don't seem to find out. Later, I asked the guy from China Construction Bank in Shanghai for half a day and didn't understand it. Then I copied the Virtual Machine of this version to the machine that can be used by the Provincial Construction Bank. (This is a waste of time.) download the package here. I don't feel very comfortable looking for this installation file. (This version may be related to the ccbrsa. dll version. I also put the ccbrsa. dll file I used)

/Files/liubiqu/msjavx86_3802.rar

 

3. In the. NET project, select ccbrsa as the registered DLL and use it normally.

 

Note:: The dynamic library can be run only with administrator permissions during deployment in win7, so you need to upgrade the permission to OK. Otherwise, the system reports: "try to read or write the protected memory. This usually indicates that other memory is damaged. .

For a 64-bit operating system, copy it to the \ syswow64 directory. Because ccbrsa. dll is compiled by a 32-bit system.

 

The following are the key points for CCB to return to our site after successful paymentCode(The key is to use it)

Code

String Ssign =   This . Request [ " Sign " ];
String Surl =   "" ;
String Sorderid =   This . Request [ " Orderid " ];
String Spayment =   This . Request [ " Payment " ];
String Scurcode =   This . Request [ " Curcode " ];
String Ssuccess =   This . Request [ " Success " ];
// Obtain the URL string used for encryption

Int IPOs = Spara. lastindexof ( ' & ' );
If (IPOs >   0 )
{
Surl = Spara. substring ( 0 , IPOs );
}
Else
{
Showpaymsg ( " Invalid URL! " );
Return ;
}
String Publickey = Configurationmanager. deleettings [ " Publickey " ]. Tostring ();
Ccbrsa. rsasig RSA;
Try
{
RSA =   New Ccbrsa. rsasigclass ();
}
Catch (Exception ex)
{
Showpaymsg ( " Payment failed! The online banking control is invalid. "   + Ex. Message );
Return ;
}
Bool Bret;
RSA. setpublickey (publickey );
Bret = RSA. verifysigature (ssign, Surl );
If (BRET)
{
If (Ssuccess =   " Y " ) // If the execution is successful, verify that the data is correct
{
// Verify that the amount is correct

Checkpayment ( " CCB " , Sorderid, convert. todouble (spayment ), Ref   This . EXC, global. Conn );
If ( This . Exc. errcode =   0 ) //
{
Showpaymsg ( " Payment successful! " );
}
Else
{
Showpaymsg ( " Payment failed. "   +   This . Exc. errdesc );
}
}
Else
{
Showpaymsg ( " Payment failed! " );
}
}
Else
Showpaymsg ( " Invalid URL! " );

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.