Ex 6

31
EX.NO: CREDIT CARD PROCESSING SYSTEM DATE: 1. INTRODUCTION The aim of this project is to implement the credit card processing system to do the crediting and the payback transaction to help the clients by easier process. Problem statement: A problem statement is a concise description of the issues that need to be addressed by a problem solving team and should be presented to them (or created by them) before they try to solve the problem. When bringing together a team to achieve a particular purpose provide them with a problem statement. The primary purpose of a problem statement is to focus the attention of the problem solving team. However, if the focus of the problem is too narrow or the scope of the solution too limited the creativity and innovation of the solution can be stifling. The credit card transaction is used by the clients to do the crediting features that are available in bank and do the payment back. The account has to be updated with the balance every time when the crediting and the payback are done. Glossary: The purpose of following the software requirement specification in credit card processing is to maintain or remain in good standing. If the rules are violated then the consequence will be more. The worst being revocation of the agreement with the credit card processing.

Transcript of Ex 6

Page 1: Ex 6

EX.NO: CREDIT CARD PROCESSING SYSTEMDATE:

1. INTRODUCTION

The aim of this project is to implement the credit card processing system to do the crediting and the payback transaction to help the clients by easier process.

Problem statement:

A problem statement is a concise description of the issues that need to be addressed by a problem solving team and should be presented to them (or created by them) before they try to solve the problem. When bringing together a team to achieve a particular purpose provide them with a problem statement.

The primary purpose of a problem statement is to focus the attention of the problem solving team. However, if the focus of the problem is too narrow or the scope of the solution too limited the creativity and innovation of the solution can be stifling. The credit card transaction is used by the clients to do the crediting features that are available in bank and do the payment back. The account has to be updated with the balance every time when the crediting and the payback are done.

Glossary:

The purpose of following the software requirement specification in credit card processing is to maintain or remain in good standing. If the rules are violated then the consequence will be more. The worst being revocation of the agreement with the credit card processing.

1.1 Audience:

The clients who use this credit card transaction system are the audience.1.2 Organization:

This software is used by the software concerns which credits the transaction and does the payback and also updates the account.

1.3 Scope of the project:

The credit cards are used during business transaction, and the rules are designed to protect both the merchant and the consumer from fraud.

Page 2: Ex 6

In its simplest form, the Glossary is a list of noteworthy terms and their definitions. It is surprisingly common that a term, often technical or particular to the domain, will be used in slightly different ways by different stakeholders; this needs to be resolved to reduce problems in communication and ambiguous requirements.

1.4 UML USE CASE MODEL A use-case diagram is a graph of actors, a set of use cases enclosed by a system boundary, communication associations between actors and the use cases and generalization among use cases.

Use cases are text documents, not diagrams, and use-case modeling is primarily an act of writing text, not drawing diagrams.

The credit card processing system is used by the customers to do crediting and payback.Scenario:

The scenario records the steps of which there are three kinds:

1) An interaction between actors and the system:

The customer is an actor who interacts with the admin system.

2) A validation:

The System usually checks whether the password given by the user is valid or not.

3) A state change by the system:

If the user wants to make any modifications in their account details, the system updates it in the database.

UML

Admin

Pwd

Trns

Acc no

Acc dtls

BLL

Unified Modeling Language

Administrator

Password

Transaction

Account Number

Account Details

Business Logic Layer

Page 3: Ex 6

User

Shopping

Crediting

Pay back

<<extend>>

<<extend>>

<<extend>>

<<extend>>

<<extend>>

Admin

Update order

Cancel order

Crediting details

Pay back details

Make order

Actors: An actor is a person, organization, or external system that plays a role in one or more interactions with your system. Actors are drawn as stick figures.Types of Actors: There are three types of actors. They are:

Primary Actor: CustomerDescription: The actor must be able to perform log in and do crediting and payback.Supporting Actor: Admin system

Page 4: Ex 6

Description: It is the supporting actor who provides service to system and validates user’s credit card.Off-stage Actor: Govt. tax deptDescription: It is the offstage actor who does not interacts with system but have an interest in how the system performs.

USE CASE:Use Case Name: User

Description: The existing customer who uses the credit card transaction database is maintained here. Use Case Name: Account database

Description: The account balances of the customers are maintained over here.Use Case Name: User database

Description: The details of the customers are maintained over here.Use Case Name: Crediting details

Description: The crediting amount of the customer and its operation is maintained over here.Use Case Name: Payback details

Description: The amount that is paid back is maintained here.Use Case Name: Update account

Description: After the crediting and payback the account balance will be updated.1.5 ACTIVITY DIAGRAM FOR A BUSINESS PROCESS

An activity diagram is a variation or special case of state machine, in which the states are activities representing the performance of operations and transitions are triggered by the completion of the operations. An activity diagram models the entire business process.

Page 5: Ex 6

Enter password

pwd accept?

amount transaction

Authorized payment

Dispatch shopping items

More trns?

Take the card

YES

NO

YES

NO

Insert card

1.6 UML CLASS DIAGRAMS

1.6.1 Conceptual super class:

A Conceptual super class definition is more general or encompassing than a subclass definition. Here the conceptual super class is customer class

1.6.2 Conceptual sub class:

Page 6: Ex 6

All members of a conceptual subclass set are members of their super class set. The following classes are subclasses of credit card system:

Admin:Admin is responsible for developing, monitoring and maintaining the

system. Admin checks whether the user has account in bank or not. If the user does not have account then the user should create account and the only admin will issue card.

User:User is the person who uses credit card

Shopping:Based on the available balance in the account shopping is done. If the

available balance is less than the balance made by the bank then they can’t shop.1.6.3 Domain model:

1) Generalization:

Abstract Conceptual Class:

Page 7: Ex 6

2) Association:

3) Composition:

Page 8: Ex 6

1.6.4 Class Diagram:

Bank

name : stringacc.no : integerpassword : string

credit update()payment update()

login

login()

customer

name : stringaccount no : integerid : stringemail : string

login()credit transaction()balance enquiry()

crediting

cardholder name : stringcard expire date : datecard no : string

credit transaction()

payment

payment transaction()

Shopping

order no : integercustomer id : stringordertotal : double

make order:integer()cancel order:integer()

Transaction

transation id : number

credit transaction()payment transaction()

Items

item id : integeritem qty : integerorder id : integer

1.7 UML INTERACTION DIAGRAMS 1.7.1 Sequence diagram

Page 9: Ex 6

Sequence diagrams are an easy and intuitive way of describing the behavior of the system by viewing the interaction between the system and its environment. A sequence diagram shows the objects participating in a time sequence. It shows the objects participating in an interaction by their lifelines and the messages they exchange, arranged in a time sequence. We can also use terminologies like Opt, Alt, Loop .

1.7.2 Collaboration diagram

A collaboration diagram represents a collaboration, which is a set of objects related in a particular context, and interaction, which is a set of objects within the collaboration, to achieve a desired outcome.

Page 10: Ex 6

Admin Create account

Modify condition

User database

Shopping

Account database

4:User does shopping

Crediting/payback

1:Creates

10:modifies databse

6:8:update account3:account is maintained

2:database maintained

7:payback

9:modifies5:Credits

1.8 STATE CHART DIAGRAM:

A state diagram is a type of diagram used in computer science and related fields to describe the behavior of systems. State diagrams require that the system described is composed of a finite number of states; sometimes, this is indeed the case, while at other times this is a reasonable abstraction. There are many forms of state diagrams, which differ slightly and have different semantics.

Page 11: Ex 6

ADMIN

issuing

cancelled

delivered

withdrawal

check balance

deductionPayment

update

an info is not available

all info available

sufficient amount

low balance

do/initiate delivery

do/check details

do/initiate withdraw

do/checking

payment of the creditdo/ from the

account

do/balance

Page 12: Ex 6

1.9 LOGICAL VIEW OF LAYERED ARCHITECTURE DIAGRAM:

1.9.1 Logical architecture:

Page 13: Ex 6

1.9.2 Package diagram

A package is a group of modeling elements. It may contain both subordinate packages and ordinary model elements. The entire system can be thought of as a single high-level package, with all the UML diagrams organized within it. It is used to designate the logical, physical and also the use case groups.

Page 14: Ex 6

Credit Card Processing

Admin Shopping

User Crediting

Acc dtls

Create Account Card issue

Make Order Cancel Order

Login View Account

Credit Amount Make Payment Update Account

Login Check Balance

1.10 USER INTERFACE LAYER:

This layer provides the user interface (UI) within a composite application. To increase user productivity, user interfaces should support easy adoption. The limitations on the UI design resulting from the capabilities of the underlying components should not be seen as constraints, but rather as some help to provide consistent UIs.

User interfaces consume Web services either from the business logic layer or the back-end layer to retrieve and update data. They do not contain any business logic. UI and business logic decoupling is implemented by using services of the business logic layer only.

User interfaces are integrated in the overall composite process by being wrapped into a callable object.

Page 15: Ex 6

1.11 DOMAIN LAYER:

A domain layer also known as the business logic layer (BLL) is a software engineering practice of compartmentalizing. The business logic layer is usually one of the tiers in a multitier architecture. It separates the business logic from other modules, such as the data access layer and user interface. By doing this, the business logic of an application can often withstand modifications or replacements of other tiers.

For example, in an application with a properly separated business logic layer and data access layer, the data access layer could be rewritten to retrieve data from a different database, without affecting any of the business logic. This practice allows software application development to be more effectively split into teams, with each team working on a different tier simultaneously.

Page 16: Ex 6

1.12 TECHNICAL SERVICES LAYER:

The Infrastructure Layer may be partitioned into different levels (high-level or low-level technical services). Though, it is not unusual that developers only consider the persistence (data access) and therefore only talk about the Persistence Layer or the Data Access Layer (instead of an Infrastructure Layer or Technical services Layer). In other words, the other kind of technical services are not always being explicitly thought of as being part of any particular layer.

Technical Services

Logging

Data Access

Persistence

Customer Details

SOAP

1.13 IMPLEMENTATION DIAGRAM

1.13.1 Component diagram:

A component diagram depicts how components are wired together to form larger components and or software systems. They are used to illustrate the structure of arbitrarily complex systems. Components are wired together by using an assembly connector to connect the required interface of one component with the provided interface of another component. This illustrates the service consumer - service provider relationship between the two components.

Page 17: Ex 6

1.13.2 Deployment diagram:

A deployment diagram in the Unified Modeling Language models the physical deployment of artifacts on nodes. The nodes appear as boxes, and the artifacts allocated to each node appear as rectangles within the boxes. Nodes may have sub nodes, which appear as nested boxes. A single node in a deployment diagram may conceptually represent multiple physical nodes, such as a cluster of database servers.

Page 18: Ex 6

1.14 TESTING

1.14.1 Test cases

1. The system when entered needs the user id and password to login.2. The account number and the credit card number are unique for each person.3. The account number must be given as the user name to login.4. In order to do transaction and see the details we need to login.5. The shopping details of the customer are updated in transaction.6. For each account only one credit card will be issued and processed.7. The credit cards will be issued based on the person’s salary.1.14.1.1 Usability test case scenarios

Scenario 1: Displays the new form entry for new users.Scenario 2: Provides the type of credit cards for the existing user’s to choose.Scenario 4: Allows the user to do Shopping and updates the amount in transaction.Scenario 3: Displays the transaction details depending upon the amount transacted.Scenario 4: Necessary payment is done based on the transaction.Scenario 5: The current balance amount is updated in the account.

1.14.1.2 User satisfaction testing

The following attributes have been selected for measuring user satisfaction. Easy to operate. Efficient to use. Visually pleasing. Provides easy recovery from errors.

Page 19: Ex 6

TABLE DESIGN:

SQL> desc ccard; Name Null? Type ----------------------------------------- -------- ------------------ UNAME VARCHAR2(10) CNO VARCHAR2(10) CLIMIT VARCHAR2(10) CBALAN VARCHAR2(10) EXPDATE VARCHAR2(12) DCNO VARCHAR2(10) DBAL VARCHAR2(10)

CODING:

FORM 1:Private Sub Command1_Click()If (Text1.Text = "" And Text2.Text = "") ThenMsgBox "plz enter all the fields", vbInformationElsevalidatinglogin "select * from ccard where uname='" & Text1.Text & "' and cno='" & Text2.Text & "'"End IfEnd SubPrivate Sub Command2_Click()EndEnd Sub

FORM 2:Private Sub Command1_Click()getexpdate "select * from ccard "End SubPrivate Sub Command2_Click()Form3.Visible = TrueEnd SubPrivate Sub Command3_Click()Form4.Visible = TrueEnd SubPrivate Sub Command4_Click()Form4.Visible = True'Form4.Text2.Text = 50000'Form4.Text3.Text = Val(Form4.Text2.Text) - Val(Form4.Text1.Text)End SubPrivate Sub Command5_Click()

Page 20: Ex 6

Form5.ShowEnd Sub

FORM 3:Dim amount As IntegerPrivate Sub Command1_Click()If (Text4.Text > Text3.Text) ThenMsgBox "You don't have enough money to purcahse", vbCriticalElseupdtrans "update ccard set cbalan=" & (Val(Text3.Text) - Val(Text4.Text)) & "where cno='" & Text1.Text & "'"MsgBox ("Purcahsed the product"), vbInformationText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""End IfEnd SubPrivate Sub Command2_Click()retcdet "select * from ccard where cno='" & Text1.Text & "'"End SubFORM 4:Private Sub Command1_Click()valcrno "select * from ccard where cno='" & Text4.Text & "'"If (Val(Text5.Text) > Val(Text3.Text)) ThenMsgBox "Transfer amt is greater than the balance amt", vbCriticalElseIf (Val(Text5.Text) > Val(balance)) ThenMsgBox "Transfer Amt should less than the Credit Card Balance", vbInformationElseupdtrans "update ccard set cbalan=" & (Val(Text5.Text) + Val(Text9.Text)) & ", dbal=" & (Val(Text3.Text) - Val(Text5.Text)) & "where cno='" & Text4.Text & "'"Label11.Caption = ""Text9.Text = (Val(Text5.Text) + Val(Text9.Text))MsgBox "Amt successfully transfered", vbInformationEnd IfEnd SubPrivate Sub Command2_Click()retdbt "select * from ccard where dcno='" & Text1.Text & "'"End Sub

FORM 5:

Private Sub Command1_Click()If (Val(Text3.Text) > Val(Text2.Text)) ThenMsgBox "Not have enough money to withdraw", vbCritical

Page 21: Ex 6

Elseupdtrans "update ccard set cbalan= " & (Val(Text2.Text) - Val(Text3.Text)) & " where cno='" & Text1.Text & "'"MsgBox "Withdrawn Successfully", vbInformationMsgBox "Your Current Balance is : " & (Val(Text2.Text) - Val(Text3.Text)), vbInformationText1.Text = ""Text2.Text = ""Text3.Text = ""End IfEnd SubPrivate Sub Command3_Click()retwdl "select * from ccard where cno='" & Text1.Text & "'"End Sub

MODULE 1:

Public myconection As New ADODB.ConnectionPublic Rs As New ADODB.RecordsetPublic balance As StringPrivate Sub Main()myconection.ConnectionString = "User ID=scott;Password=tiger;Data Source=odsn"myconection.OpenIf myconection.State = adStateOpen Then Form1.ShowElse

MsgBox "Error in Connecting Database please check Connection", vbCriticalEnd IfEnd Sub

Public Function validatinglogin(strSQl As String)If Rs.State = 1 Then Rs.CloseRs.Open strSQl, myconectionIf Rs.EOF ThenMsgBox "Invalid username/password"ElseForm1.Visible = FalseForm2.ShowEnd IfEnd Function

Public Function getexpdate(strSQl As String)If Rs.State = 1 Then Rs.CloseRs.Open strSQl, myconectionMsgBox "Expire date is " & Rs!expdate, vbInformation

Page 22: Ex 6

MsgBox "The available balance for this card is " & Rs!cbalan, vbInformationEnd FunctionPublic Function retcdet(strSQl As String)If Rs.State = 1 Then Rs.CloseRs.Open strSQl, myconectionIf Rs.EOF ThenMsgBox "Invalid Card Number", vbCriticalElseForm3.Text2.Text = Rs!unameForm3.Text3.Text = Rs!cbalanEnd IfEnd Function

Public Function updtrans(strSQl As String)If Rs.State = 1 Then Rs.CloseRs.Open strSQl, myconectionEnd Function

Public Function retdbt(strSQl As String)If Rs.State = 1 Then Rs.CloseRs.Open strSQl, myconectionIf Rs.EOF ThenMsgBox "Invalid Card Number", vbCriticalElseForm4.Text2.Text = Rs!unameForm4.Text3.Text = Rs!dbalForm4.Text6.Text = Rs!cnoForm4.Text7.Text = Rs!unameForm4.Text8.Text = Rs!climitForm4.Text9.Text = Rs!cbalanbalance = (Rs!climit - Rs!cbalan)Form4.Label11.Caption = "Balance amt have to pay " & balance

End IfEnd FunctionPublic Function valcrno(strSQl As String)If Rs.State = 1 Then Rs.CloseRs.Open strSQl, myconectionIf Rs.EOF ThenMsgBox "Invalid Card Number", vbCriticalEnd IfEnd FunctionPublic Function retwdl(strSQl As String)If Rs.State = 1 Then Rs.CloseRs.Open strSQl, myconectionIf Rs.EOF Then

Page 23: Ex 6

MsgBox "Invalid Card Number", vbCriticalElseForm5.Text2.Text = Rs!cbalanEnd IfEnd Function

SCREEN SHOTS:

Page 24: Ex 6
Page 25: Ex 6
Page 26: Ex 6

CONCLUSION:

Computerization of CREDIT CARD MANAGEMENT SYSTEM does effectively reduce the manual work involved in generating credit card to a citizen with unique credit card number. It saves time and gives easy access for already stored information. It enables the ADMINISTRATOR in providing faster services to the applicants. The system is completely menu driven and extremely user friendly since it is developed in an efficient front end tool Visual Basic. Appropriate error messages are also provided too guide the user in a proper and user friendly manner. The system has effective management of records which holds all the information of a particular citizen.

Page 27: Ex 6