Beruflich Dokumente
Kultur Dokumente
Payment Interface
Prepaid 4.3.8
Technical Description
5035581/9
2
Payment Interface
3
3Copyright
4
5
6
7
8
Copyright Tecnomen Corporation 2008. All rights reserved. No part of this document
may be reproduced, distributed, stored in a retrieval system or translated into any language,
in any form or by any means, electronic, mechanical, magnetic, optical, photocopying,
manual or otherwise, without the prior written permission of Tecnomen. For additional
copies of the document, please contact Tecnomen by e-mail: feedback@tecnomen.com.
9Disclaimer
10
11
12
13
14
Tecnomen makes no representations or warranties with respect to the contents hereof and
specifically disclaims any implied warranties of merchantability or fitness for any
particular purpose. Further, Tecnomen reserves the right to revise this publication and to
make changes from time to time in the contents hereof without obligation to notify any
person of such revision or changes.
15Feedback
16
17
18
19
Tecnomen endeavours to provide accurate and useful documentation for all Tecnomen
products. To achieve this goal, the documentation group welcomes your comments and
suggestions regarding any aspect of Tecnomen user documentation. Send your comments
by e-mail to: feedback@tecnomen.com.
Products and product names mentioned in this document may be trademarks or registered
trademarks of their respective owners.
23Revision History
Version Issued
1
12.07.2006
2.
14.07.2006
28.08.2006
Sections 2.1 and 4.1 was updated and the following new sections were added:
4.2, 4.16, 4.17, 4.18, 4.19, 4.20, 4.21 and 4.22. PaymentEngine:: was added to
the name of the operation in sections 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 4.10, 4.11,
4.12, 4.13, 4.14 and 4.15.
31.08.2006
20.09.2006
28.11.2006
20.09.2007
5035581/9
4
Description
Payment Interface
5
Version Issued
Description
15.05.2008
26.05.2008
Document
Status
Issue date
5035581/9
Issued
26.05.2008
Author
Editor
Acceptor
Louise Naimi
Louise Naimi
Louise Naimi
Payment Interface
7
Preface
24
25About
26
27
This Document
This document describes Tecnomens Payment Interface as a centralised payment related
service.
28Audience
29
30
31Notational
32
Conventions
33Margin Symbols
34
Notes, cautions and warnings appear to highlight important or critical procedures and tips.
35
Note:
36
Caution: Used to highlight procedures you must follow exactly.
37
Warning:
Used to highlight critical procedures you must follow exactly. Otherwise, you
may experience data loss or application failure.
38
39
5035581/9
8
Contents
Contents
40
411.
42
43
44
45
46
47
48
INTRODUCTION..............................................................................................................................1
1.1. Tecnomens Prepaid Architecture.............................................................................................1
1.1.1. SDP/PSP.......................................................................................................................1
1.2. What is the PaymentEngine ?...................................................................................................1
1.3. Multiple Client Support............................................................................................................2
1.4. Authentication Server Process..................................................................................................3
1.4.1. Authserver.....................................................................................................................3
1.5. Mediation Device Router (MDR) Support...............................................................................4
492.
50
PAYMENTINTERFACE TUTORIAL...............................................................................................5
2.1. High-Level Logical Flow.........................................................................................................5
513.
52
53
54
55
56
57
58
59
60
61
624.
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Payment Interface
5035581/9
ii
Contents
11
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
4.6.
4.7.
4.8.
4.9.
4.10.
4.11.
4.12.
4.13.
4.14.
4.15.
4.16.
4.17.
Payment Interface
5035581/9
Contents
13
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
4.18.
4.19.
4.20.
4.21.
4.22.
4.23.
4.24.
4.25.
iii
147APPENDIX A: AUTHFACTORY.IDL...................................................................................................70
148APPENDIX B: EXCEPTIONS.IDL.......................................................................................................71
149APPENDIX C: TINCDEFS.IDL.............................................................................................................72
150APPENDIX D: TYPES.IDL...................................................................................................................73
151APPENDIX E: PAYMENTENGINE.IDL..............................................................................................74
152APPENDIX F: AUTHFACTORY_IMPL.JAVA.....................................................................................75
153APPENDIX G: PAYMENTENGINE.JAVA...........................................................................................80
154APPENDIX H: RECHARGECLIENT.JAVA.........................................................................................84
155APPENDIX I: RECHARGECLIENT.SH...............................................................................................97
Payment Interface
5035581/9
iv
Contents
15
156APPENDIX J: TRACE.JAVA.................................................................................................................98
157APPENDIX K: SIMPLECLIENT.JAVA.................................................................................................99
158APPENDIX L: TPEDEFS.IDL.............................................................................................................100
159DEFINITIONS AND REFERENCES..................................................................................................101
160
161
Payment Interface
5035581/9
1
17
1. Introduction
162
163
164
Note:
1651.1.
166
167
With the introduction of Tecnomen Prepaid 4.3 a new Prepaid system architecture is
implemented. The new architecture consists of four basic functional layers:
168
169
170
171
172
173
1.1.1. SDP/PSP
174
175
176
177
The Service Data Point (SDP) provides the Service Control Function (SCF) with access to
the data required by service logic programs (e.g. subscriber data). Therefore, the SDP
contains the Service Data Function (SDF).
178
179
The Prepaid Support Point (PSP) provides additional support functionality for Tecnomens
Prepaid Service e.g. Short Message Notification, PaymentEngine, Agenda Manager etc.
180
1.1.1.1.
181
182
Refer to the Tecnomen Customer Care Technical Description for details on HA Failover
support.
1.2.
183
184
185
186
187
188
The existing IDL Gateway, which supports a generic interface to the Tecnomen Prepaid
Service will co-exist with the PaymentEngine. The various payment related operations use
the PaymentEngine to carry out the work. The difference between the existing IDL
Gateway and the PaymentEngine is the IDL Gateway is optimised for generality, whilst the
PaymentEngine is optimised for speed.
189
190
191
192
Payment Interface
5035581/9
2
19
193
194
195
196
197
198
199
200
201
The diagram below (Fig 1-1) depicts the high-level architecture of the PaymentEngine and
AuthServer being hosted on the PSP, in relation to the SDP.
202
203
The various permitted PaymentEngine operations are detailed, as being called via one or
more either internal or external clients.
1.3.
204
205
206
207
Each PaymentEngine instance will support a certain Transaction Per Second (TPS) call
rate, governed by the platform its running on, restrictions imposed by the PSP and SDP
platforms and finally a Licenced TPS limit, per engine.
208
209
To achieve higher TPS rates it may be necessary, to use multiple clients to achieve the
overall call rate required.
IDL Operations*
Login
Return IOR
Login
PSP
authServer
Return IOR
PaymentEngine
PaymentEngine
[PaymentInterface
PaymentEngine
PaymentEngine
PaymentEngine
1-50]
IDL Operations*
IDL Operations *
directFundTransfer
directDebitTransfer
onlineFundTransfer
periodFundTransfer
fundTransfer
Return IOR
Login
IDL Operations*
SDP
210
211
Payment Interface
5035581/9
3
21
212
213
214
215
1.4.
216
217
218
219
220
221
1.4.1. Authserver
222
223
224
The job of the authServer is to hand out connection information (amongst other things) to
clients that request them, after a login/password authentication dialogue has taken place.
225
226
227
228
The authServer has additionally an element of fault tolerance built in. Upon startup, or
whenever requested, the authServer will read and cache the current user login/password
information thats persistently stored in the CC_DB. Caching reduces the dependency on
CC_DB (and hence the Customer Care host) requirement of being available.
229
230
An additional aspect of the authServer is that it enables central control of transaction rate
settings for any and all processes that use it.
231
232
233
234
235
Upon startup, the PaymentEngine, for instance, registers its IOR (CORBA Interoperable
Object Reference) with authServer and is subsequently given both a unique key, for use
in authorising subsequent getPaymentEngine() requests from clients, and one or more
parameters to control the number of engines (threads) allowed, and the max TPS allowed
per engine.
1.5.
236
Note:
237
238
Mediation Device Router file generation is supported. For further information on the
Mediation Device Router (MDR), see ref. /1/.
Payment Interface
5035581/9
4
23
2. PaymentInterface Tutorial
239
240
241
The following sections describe, in detail, the steps necessary to successfully interface to
the PaymentInterface.
242
243
244
245
The necessary CORBA IDL definitions of the required interfaces are in the appendix. The
supplied sample code, in the appendix, is written in java. We also supply, with the delivery,
the C++ source code for a simple load test tool that is more realistic, in terms of what a
typical C++ client will need to do.
246
247
This tutorial, whilst concentrating on the java sample code, is applicable at a high level to
the C++ code. All the same logical steps are required, no matter what language is used.
248
249
250
The full IDL definitions of all necessary components are listed in the appendices, including
all necessary return codes (in Appendix E: PaymentEngine.idl) and error codes (in
Appendix C: TINCdefs.idl)
2.1.
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
Payment Interface
5035581/9
5
25
275
276
277
10. Use the VoucherJobMgr thus obtained, to call available operations, such as
getJobDetails, getJobDetailsSeq, etc., as per the provided CORBA IDL
specification of the PaymentEngine. See appendix E.
278
279
280
11. Repeat step 8, 9 and 10 repeatedly, until there is a need, at some point, to
disconnect; the concept being that the clients will have a long lived
connection to the paymentEngine.
281
282
283
284
12. Upon exit of the client, the client MUST remember to properly disconnect
from the PaymentEngine and AsyncEngine that it currently has. This is
achieved by using the PaymentEngine Factorys releasePaymentEngine(),
releaseAsyncEngine operations.
285
286
287
288
289
290
It is important to realise that there is an overhead in asking the PaymentEngine Factory for
a paymentEngine, especially if you consider the process of first authenticating with the
authServer, and in general carrying out steps 1 to 5 above.
291
292
293
The client should do all of its authentication once, at the beginning, and from then on just
use the provided PaymentEngine CORBA handle to execute the required payload
operations.
294
295
296
297
The only other circumstance under which a client is required to request for a new
paymentEngine, is in the event that something goes wrong, i.e. some error condition at the
process or CORBA level, at which time the client must assume that it must re-authenticate,
and thus get a new PaymentEngine handle, as per the above sequence.
298
299
300
301
Finally, it is vital that the client, is a well-behaved client, in so much as the client MUST
follow the proper disconnection sequence, as detailed later. Essentially, this means using
the factories releasePaymentEngine() operation, before the client exits. Failure to do this
will cause the clients to be blocked from subsequent access for a period of time1.
26
27
The PaymentEngine Factory will eventually notice that there exists a stale paymentEngine, however this
might take some considerable time, typically about 60 minutes.
Payment Interface
5035581/9
6
29
302
Caution: In order to comply with Java 1.4.x requirements, all code must be scoped into modules, i.e must
be packaged. All code relevant to the CORBA Payment Interface and this manaul has been placed
in the TINC (Tecnomen Intelligent Network Customer Care) name space.
3.1.
303
304
305
The authServer is a central authentication service. All client processes, whether internal or
external must use it to authenticate the client.
306
307
308
Upon successful authentication, the authServer will hand back to the calling client the
necessary data required to attach to one or more permitted services within the Tecnomen
system.
309
310
311
There is no other way to connect to any Tecnomen process, without first having to go to
the authServer, since it acts as both a Secure Naming Service and an authentication
Service.
3.1.1. Using resolve_initial_references(AuthFactory)
312
313
314
315
The authServer uses a Persistant Lifespan Policy. Clients can use the
CORBA::ORB::resolve_initial_references() mechanism to bind to the service, just like
they would to bind to the NamingService.
316
317
authServer -ORBEndpoint iiop://PSP:1500
318
319
320
From the above command we see that the server is using an IIOP (Internet Inter-Operable
Protocol) transport. The process is registered to listen on port 1500 on the PSP host.
321
322
323
clientProcess -ORBInitRef AuthFactory=corbaloc:iiop:PSP:1500/AuthServer
324
325
326
A typical C++ client then uses the following commands to bind to the server :Payment Interface
5035581/9
7
31
327
// First we initialise the ORB
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
// Finally, we get a reference using resolve_initial_references()
CORBA::Object_var obj = orb->resolve_initial_references(AuthFactory);
AuthFactory_var factory = AuthFactory::_narrow(obj.in());
If (CORBA::is_nil(factory.in())) {
Cerr << AuthFactory::_Narrow() failed ! << endl;
Return 1;
}
328
329
330
331
Appendix J shows a simple java client using the same mechanism. On line 32, in the
SimpleClient.java file, we see the specification of the corbaloc string in the usage section
of this class.
332
333
As can be seen from this example, the steps involved in connecting to the AuthFactory are
much simplified, with the knowledge of the hostname and port number of the AuthServer.
3.1.2. Using AuthServer IOR File
334
335
Upon startup, the authServer will deposit its IOR according to the Server Config setting
336
337
338
/mountp/var/ior/authServer.ior
339
Note:
If the IOR is not in the default location please contact the Tecnomen Project Engineer for
assistance.
340
341
342
343
344
To connect to the authServer, the client must first be able to access this IOR file, load it,
and then use it in combination with the CORBA::string_to_object(iorString) method to get
a handle on the authServer itself. Appendix F details this step on line 43, of the
AuthFactory_impl.java code.
345
346
The AuthFactory_impl constructor, takes as its second argument the file name in which
the authServer IOR is located.
347
Appendix F, line 23, a helper function is used to read in the contents of this file.
348
349
350
351
Appendix F, line 53, a CORBA helper class is used to narrow the object reference
obtained using the orb.string_to_object(iorString) call to the correct type of object. In our
case, we are testing that it narrows to an instance of an AuthFactory, as defined in the
AuthFactory IDL definition in Appendix A.
Copyright Tecnomen Corporation 2008
Payment Interface
5035581/9
8
33
3.2.
352
Authenticate
353
354
Once a valid handle on the authServer is obtained, it is used to authenticate the client
session.
355
356
357
358
The AuthServer_impl::login() function takes as args a user and password, and a sequence
holder to the to be returned ServiceKeySeq sequence.
359
360
361
362
The AuthFactory::login operation returns both a sequence of available services, in the sSeq
parameter sequence, as shown on line 140 (Appendix F), and also returns information
about the internal authenticated user, which must later be used in subsequent
paymentEngine operations.
3.3.
363
364
365
Appendix H: RechargeClient.java source code illustrates the glue that ties together all the
other components.
366
Appendix H line 43, shows the setting of the default location of the authServers IOR file.
367
368
Appendix H line 74, shows the client constructing the AuthFactory_impl class, described
above, and subsequently on line 78 calling the factories login() method.
369
370
On lines 95 through 110, shows the client parsing the returned serviceKeySeq from the
authServer.
371
372
On line 99, the service part of the returned structure must be validated against the
required service. A match to the PAYMENT2 service is required..
373
374
We see on line 102 the required factory key is extracted, and on line 104 the required
PaymentEngine Factorys IOR string is extracted.
375
Where necessary, it is possible to have Payment Engine processes running in parallel.
This would only be required currently in the event that the customers existing client
architecture precludes the possibility of running multiple physical client processes.
To cater for a multi-threaded client, it is possible to configure each client thread to attach
to its individual PaymentEngine process, as a workaround.
Contact Tecnomen to avail of this configuration.
Note:
3.4.
376
377
378
34
35
36
PAYMENT service refers to an integer key value of 100 the AuthServers service key for the
PaymentEngine.
Payment Interface
5035581/9
9
38
379
380
381
Appendix H, line 125, a CORBA standard helper class is used to narrow the
paymentFactoryObj variable to a CORBA object of the required type in this case a
PaymentEngine_Factory object, as described in Appendix E.
3.5.
382
383
384
385
386
387
On line 135 of Appendix H, an actual PaymentEngine instance is got with the obtained
PaymentEngine Factory CORBA handle. The previously obtained factoryKey, as given by
the authServer must be used. Failure to provide a valid key, i.e. one obtained directly from
the authServer will result in a failure to get a PaymentEngine instance. An exception will
be thrown by the server, and the CORBA reference will be NULL.
388
389
390
On line 147, the engineId() operation on the PaymentEngine instance is called. This
returns the instance id of the actual payment engine that is currently being used. We will
need this value later, when we disconnect from the server.
391
392
Finally, on line 150, a PaymentEngine_impl helper class is constructed, which will wrap
all interaction with the PaymentEngine operations, as defined in Appendix E.
3.6.
393
Call directFundTransfer
394
395
On line 216 of Appendix H, the declaration of the function used to carry out the actual
functions of interest is illustrated.
396
397
398
399
400
3.7.
401
Extract Results
402
403
404
Line 296 shows the call to the clients directFundTransfer helper operation.
405
406
The required input parameters, i.e. Subscriber Id, Amount and Transaction Type to the
helper class, are supplied, as described in Appendix G.
407
408
409
Line 43 of Appendix G, shows the actual call to the remote PaymentEngine object,
passing it all the necessary parameters, including the operatorId value obtained way back
from the authServers returned UserInfo structure.
410
411
412
Lines 316 to 335 of Appendix H, shows the extraction of the resultant data, including the
result code (major and minor), and all of the subscriber data, such as the accountBalance,
serviceStatus, accountStatus, Expiry, etc.
Payment Interface
5035581/9
10
40
3.8.
413
414
415
416
417
Line 191, shows the client calling the correct release operation on the PaymentEngine
Factory, using the factoryKey and engineId instance obtained in the initialisation sequence
earlier.
Payment Interface
5035581/9
11
42
418
4.1.
419
420
421
422
Type
Field
Description
CORBA::Short
result
CORBA::Short
transferResult
CORBA::Long
accountBalance
CORBA::Short
serviceStatus
Service Status
0:
1:
2:
3:
4:
5:
6:
7:
8:
CORBA::Short
accountStatus
Inactive
Active
SuspendedManually
Stolen
SuspendedFraud
SuspendedErrors
SuspendedMaxBalance
SuspendedInvalidPin
Frozen (Blocked)
Account Status
1:
2:
3:
4:
5:
FirstTime
Normal
RechargeExpired
Disconnected
Shutdown
TDateTime
expiryDate
CORBA::Short
profileID
Profile ID
CORBA::Long
subOptions
TDateTime
ivrQueryExpiryDate
CORBA::Short
ivrQueryCounter
CORBA::Long
amountBalance
CORBA::Long
periodicBalance
TDateTime
periodicExpiry
CORBA::Long
bonusBalance
TDateTime
bonusExpiry
CORBA::Long
smBalance
Payment Interface
5035581/9
12
44
Type
Field
Description
TDateTime
smExpiry
CORBA::Long
dataBalance
TDateTime
dataExpiry
TDateTime
LastRechargeDate
423
4.2.
424
425
426
Other Payment Engine operations use a common return sequence as the result of each
operation.
427
TYPE
Max.
Size
DESCRIPTION
Result
CORBA::Short
TransferResult
CORBA::Short
AccountBalance
CORBA::Long
ServiceStatus
CORBA::Short
Service Status
0:
1:
2:
3:
4:
5:
6:
7:
8:
AccountStatus
CORBA::Short
Inactive
Active
SuspendedManually
Stolen
SuspendedFraud
SuspendedErrors
SuspendedMaxBalance
SuspendedInvalidPin
Frozen (Blocked)
Account Status
1:
2:
3:
4:
5:
FirstTime
Normal
RechargeExpired
Disconnected
Shutdown
ExpiryDate
TDateTime
ProfileID
CORBA::Short
Profile ID
SubOptions
CORBA::Long
IvrQueryExpiryDa
te
TDateTime
IvrQueryCounter
CORBA::Short
AmountBalance
CORBA::Long
PARAMETER
TYPE
PeriodicBalance
CORBA::Long
Payment Interface
5035581/9
Max.
Size
DESCRIPTION
Periodic Account Balance (100,000 == 1)
13
46
PeriodicExpiry
TDateTime
BonusBalance
CORBA::Long
BonusExpiry
TDateTime
SmBalance
CORBA::Long
SmExpiry
TDateTime
DataBalance
CORBA::Long
DataExpiry
TDateTime
LastRechargeDat
e
TDateTime
428
4.2.1. Major Return Codes
429
Value
e-Numerator
Description
e_OK
Successful
e_SubscriberDoesNot Exist
e_InvalidAccountState
e_InvalidAmount
Incorrect Amount
e_TemporaryError
Fatal Error
e_VoucherQueueError
e_InvalidServiceState
e_QualityOfService
Service Outage
e_InvalidVoucher
Invalid voucher
e_VoucherNotFound
10
e_CDRError
11
e_UnChargedAmount
12
e_Reserved012
Future Use
13
e_Reserved013
Future Use
14
e_Reserved014
Future Use
15
e_Reserved015
Future Use
16
e_Reserved016
Future Use
17
e_Reserved017
Future Use
18
e_Reserved018
Future Use
19
e_Reserved019
Future Use
Value
e-Numerator
Description
20
e_InvalidParamType
21
e_InvalidParamCount
Payment Interface
5035581/9
14
48
22
e_InvalidOperation
23
e_InvalidSubscriberId
24
e_InvalidOperatorId
Future Use
25
e_-InvalidTransactionType
Future Use
26
e_InvalidRechargeDiscount
Future Use
27
e_InvalidMainBalanceDelta
Future Use
28
e_InvalidMainExpiryDate
Future Use
29
e_InvalidMainExpiryDelta
Future Use
30
e_InvalidPeriodicBalanceDelta
Future Use
31
e_InvalidPeriodicExpiryDate
Future Use
32
e_InvalidPeriodicExpiryDelta
Future Use
33
e_InvalidPeriodicPlanId
Future Use
34
e_InvalidBonusBalanceDelta
Future Use
35
e_InvalidBonusExpiryDate
Future Use
36
e_InvalidBonusExpiryDelta
Future Use
37
e_InvalidBonusPlanId
Future Use
38
e_InvalidSmBalanceDelta
Future Use
39
e_InvalidSmExpiryDate
Future Use
40
e_InvalidSmExpiryDelta
Future Use
41
e_InvalidSmPlanId
Future Use
42
e_InvalidDataBalanceDelta
Future Use
43
e_InvalidDataExpiryDate
Future Use
44
e_InvalidDataExpiryDelta
Future Use
45
e_InvalidDataPlanId
Future Use
46
e_FeatureNotAvailable
Future Use
430
Payment Interface
5035581/9
15
50
4.3.
431
PaymentEngine::directFundTransfer Operation
432
433
434
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
435
The following rules apply to the directFundTransfer (dFT) operation:
Note:
436
TINC::is
inferred
PE_AccountDetails directFundTransfer( in string<SUBID_LENGTH> subid,
in long amount,
in short rechargeDiscountRate,
in TDateTime expiryDate,
in short transactionType,
in long operatorId
)
raises (Pi_exception);
437
438
51
Payment Interface
5035581/9
16
53
439
Parameter
Type
Max.
Size
subId
CORBA::String
amount
30
Default
Req
Description
None
key
CORBA::Long
None
mandatory
expiryDate
eFieldType::dtim
e
None
mandatory
transactionType
CORBA::Short
None
mandatory
User defined
rechargeDiscount
CORBA::Short
None
mandatory
operatorId
CORBA::Long
None
mandatory
440
4.3.2. CDRs Generated by directFundTransfer
441
Transaction Tag
Type
47
Description
442
Payment Interface
5035581/9
Value
Description
OK
100
101
110
111
120
121
122
123
130
131
200
Temporary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
17
55
4.4.
443
PaymentEngine::directFundTransferSeq Operation
444
445
446
447
448
449
Warning:
450
451
Caution:
The TINC package name space is inferred automatically in order to comply with Java
1.4.x
452
Payment Interface
5035581/9
18
57
453
The following rules apply to the directFundTransferSeq (dFT) operation:
Note:
454
455
456
457
458
TYPE
Max.
Size
DEFAULT
REQ.
DESCRIPTION
30
None
key
subId
CORBA::String
Amount
CORBA::Long
None
mandatory
transactionType
CORBA::Short
None
mandatory
User defined
rechargeDiscount
CORBA::Short
None
mandatory
expiryDate
eFieldType::dti
me
None
mandatory
58
Payment Interface
5035581/9
19
60
459
PARAMETER
TYPE
Max.
Size
DEFAULT
REQ.
DESCRIPTION
operatorId
CORBA::Long
None
mandatory
isFinalCall
CORBA::Boole
an
None
mandatory
460
4.4.2. CDRs generated by directFundTransferSeq
461
462
Transaction Tag
Type
47
Description
463
4.4.3. directFundTransferSEQ Minor Result Codes
464
465
Value
Description
OK
100
101
110
111
120
121
122
123
130
131
200
Temporary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
Payment Interface
5035581/9
20
62
Value
Description
400
Programming Error
466
4.5.
467
PaymentEngine::directDebitTransfer Operation
468
469
470
471
472
473
Caution:
The TINC package name space is inferred automatically in order to comply with Java
1.4.x
474
TINC::is
inferred
PE_AccountDetails directDebitTransfer(
in
in
in
)
raises (Pi_exception);
in string<SUBID_LENGTH> subid,
long amount,
short transactionType,
long operatorId
475
476
477
Parameter
Type
subId
CORBA::String
Amount
Max.
Size
Req.
Description
None
Key
CORBA::Long
None
mandatory
transactionType
CORBA::Short
None
mandatory
User defined
operatorId
CORBA::Long
None
mandatory
Payment Interface
5035581/9
30
Default
21
64
478
Transaction Tag
Type
74
Description
479
4.5.3. directDebitTransfer Minor Result Codes
480
Value
Description
OK
UnCharged Amount
100
101
110
111
120
121
122
123
130
131
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
481
4.6.
482
PaymentEngine::directDebitTransferSeq Operation
483
484
485
486
487
488
489
490
491
Payment Interface
5035581/9
22
66
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
492
short directDebitTransferSeq(inout tincSeq pSeq,
inout recordSeq rSeq)
raises (Pi_exception);
493
494
495
496
497
TYPE
Max.
Size
DEFAULT
REQ.
DESCRIPTION
30
None
key
subId
CORBA::String
Amount
CORBA::Long
None
mandatory
transactionType
CORBA::Short
None
mandatory
User defined
operatorId
CORBA::Long
None
mandatory
isFinalCall
CORBA::Boole
an
None
mandatory
498
499
4.6.2. CDRs generated by directDebitTransferSeq
500
Transaction Tag
Type
74
Description
501
4.6.3. directDebitTransferSeq Minor Result Codes
502
Payment Interface
5035581/9
Value
Description
OK
UnCharged Amount
100
23
68
4.7.
503
504
505
506
Value
Description
101
110
111
120
121
122
123
130
131
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
PaymentEngine::onlineFundTransfer Operation
This is the onlineFundTransfer operation used to transfer funds to the subscribers
account and is treated in a similar manner as a voucher recharge, therefore a Subscribers
account status is set to Normal.
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
507
Note:
onlineFundTransfer enforces the minumum and maximum credit balances as defined in the
MaxDefines table.
508
TINC::is
inferred
509
510
Payment Interface
5035581/9
24
70
511
Parameter
Type
subId
CORBA::String
Amount
Max.
Size
30
Default
Req.
Description
None
key
CORBA::Long
None
mandatory
expiryTimer
CORBA:Short
None
mandatory
transactionType
CORBA::Short
None
mandatory
User defined
operatorId
CORBA::Long
None
mandatory
512
4.7.2. CDRs Generated by onlineFundTransfer
513
Transaction Tag
Type
Description
BANK_RECHARGE
15
Bank recharge
514
4.7.3. onlineFundTransfer Minor Result Codes
515
Payment Interface
5035581/9
Value
Description
OK
100
101
110
111
120
121
122
123
130
131
150
151
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
25
72
Value
Description
400
Programming Error
516
4.8.
517
PaymentEngine::onlineFundTransferSeq Operation
518
519
520
521
522
523
525
onlineFundTransferSeq enforces the minumum and maximum credit balances as defined in the
MaxDefines table.
Note:
526
528
529
530
531
532
TYPE
Max.
Size
DEFAULT
REQ.
DESCRIPTION
30
None
key
subId
CORBA::String
Amount
CORBA::Long
None
mandatory
expiryTimer
CORBA:Short
None
mandatory
transactionType
CORBA::Short
None
mandatory
User defined
operatorId
CORBA::Long
None
mandatory
isFinalCall
CORBA::Boole
an
None
mandatory
Payment Interface
5035581/9
26
74
533
4.8.2. CDRs generated by onlineFundTransferSeq
534
Transaction Tag
Type
Description
BANK_RECHARGE
15
Bank recharge
535
4.8.3. onlineFundTransferSeq Minor Result Codes
536
Value
Description
OK
100
101
110
111
120
121
122
123
130
131
150
151
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
537
4.9.
538
539
540
PaymentEngine::periodFundTransfer Operation
This is the periodFundTransfer operation used to implement the Autocontrol and
Periodic Account features.
Payment Interface
5035581/9
27
76
541
542
543
This operation must be configured via the system-wide ServerConfig entry pftVersion to
determine the functionality to support. There are 4 available options, each of which is
detailed in Ref. /3/ Periodic Account Feature Description manual.
544
545
The periodFundTransfer operation takes the value specified in the amount parameter and
applies it to the Periodic_Balance field based on the transactionType parameter that is set5.
546
Additional rules governing functionality can apply depending on the system-wide pftVersion
selected and TransactionType parameters supplied via the periodFundTransfer operation, Refer to
Ref. /3/, Appendix B for a table describing the functionality of the pftVersion and TransactionType
parameters.
Note:
547
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
548
TINC::is
inferred
PE_AccountDetails periodFundTransfer( in string<SUBID_LENGTH> subid,
in long amount,
in TDateTime expiryDate,
in short tariffPlanId,
in long accountBalanceDelta,
in short transactionType,
in long operatorId
)
raises (Pi_exception);
549
550
551
Parameter
Type
Subid
Required
Description
CORBA::String
Key
Subscriber number
Amount
CORBA::Long
Mandatory
expiryDate
eFfieldType::dtim
e
Mandatory
tariffPlanId
CORBA::Short
Mandatory
accountBalanceDelta CORBA::Long
Mandatory
transactionType
CORBA::Short
Mandatory
operatorId
CORBA::Long
Mandatory
77
78
79
80
Default
: 0: Periodic Account value is replaced by the specified amount and the Account Status is set to Normal if the value specified in
positive.
1: Periodic Account value is incremented by the specified amount and the Account Status is set to Normal if the value specified is
positve.
Payment Interface
5035581/9
28
82
552
Transaction Tag
Type
Description
62
553
4.9.3. periodFundTransfer Minor Result Codes
554
5554.10.
Value
Description
OK
100
101
110
111
120
121
122
123
130
131
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
PaymentEngine::periodFundTransferSeq Operation
556
557
558
559
560
561
562
563
564
This operation must be configured via the ServerConfig entry pftVersion to determine
whether Autocontrol (pftVersion option 1) or Periodic Account, also known as standard
version (pftVersion option 0) is set. Refer to Ref. /2/, Customer Care Administrator
Manual for details on the Server Configuration options.
Payment Interface
5035581/9
29
84
565
566
567
The periodFundTransferSeq operation takes the value specified in the amount parameter
and applies it to the Periodic_Balance field based on the transactionType parameter that is
set6.
Note:
568
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
569
short periodFundTransferSeq(inout tincSeq pSeq,
inout recordSeq rSeq)
raises (Pi_exception);
570
571
572
573
574
Input Parameters
Parameter
Type
Subid
Required
Description
CORBA::String
Key
Amount
CORBA::Long
Mandatory
expiryDate
eFieldType::dtime
Mandatory
tariffPlanId
CORBA::Short
Mandatory
accountBalanceDelta CORBA::Long
Mandatory
transactionType
CORBA::Short
Mandatory
operatorId
CORBA::Long
Mandatory
85
86
87
88
Default
: 0: Periodic Account value is replaced by the specified amount and the Account Status is set to Normal if the value specified in
positive.
1: Periodic Account value is incremented by the specified amount and the Account Status is set to Normal if the value specified is
positve.
Payment Interface
5035581/9
30
90
Parameter
Type
Default
isFinalCall
CORBA::Boolean None
Required
Description
Mandatory
575
4.10.2.
576
Transaction Tag
Type
Description
62
4.10.3.
577
578
Value
Description
OK
100
101
110
111
120
121
122
123
130
131
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
579
4.11.
580
581
582
PaymentEngine::fundTransfer
Prior to Prepaid 4.3.6, Subscribers had one associated prepaid account balance, known as
the Main Account.
Payment Interface
5035581/9
31
92
An exception to this rule are customer sites that have the Periodic Account feature installed. This
feature is now standard with Prepaid Release 4.3.6 and higher. Refer to the Periodic Account
Feature Description for more information on this feature.
Note:
583
584
585
586
587
588
589
To support the modification of the new account balances: Bonus Account, SM Account,
Data Account, and the existing Main Account, as well as their associated expiry date
details, a new Payment Engine operation called fundTransfer has been developed.
The directFundTransfer operation also supports the updating of the existing Recharge Discount
Rate as as well as Periodic Account balance and expiry details.
Note:
591
592
593
594
595
The fundTransfer operation uses a new parameter called p_OperationType to determine the
type of operation to perform. For Prepaid, the directFundTransfer and onlineFundTransfer
operations are the only valid selection, but future releases will see all backend
paymentEngine operations7 supported by fundTransfer.
596
597
The fundTransfer operation provides a Sequence of ANY API to the various underlying
operations available via the CORBA Payment Interface.
598
eFundTransferResult fundTransfer(
in tincSeq pSeq,
out tincSeq dSeq)
raises (Pi_exception);
599
600
601
602
op_DirectFundTransfer
603
604
605
606
607
608
609
610
611
93
94
7
8
Payment Interface
5035581/9
32
96
612
The following rules apply to the directFundTransfer (dFT) operation:
Note:
If only the Main Account10 expiry date is set, then Multiple Account expiry dates are
adjusted accordingly if required.
613
615
op_OnlineFundTransfer
616
617
618
619
620
621
622
623
624
97
98
99
PE legacy directFundTransfer operation via Payment Interface or IDL Gateway can also set Main Account
expiry date.
10
See Footnote 7
Payment Interface
5035581/9
33
101
625
The following rules apply to the OnlineFundTransfer (oFT) operation:
Note:
626
4.11.1.
627
628
4.11.1.1.
Place
Holder12
Parameter
p_OperationTy OperationType
pe
Type
eFundTransfer
Op
None
Required
Description
Key
Type of payment
operation:
op_DirectFundTransfer
p_SubID
subId
CORBA::String
30
p_OperatorId
OperatorId
CORBA::Long
None
Key
Unique Prepaid
Subscriber number
Mandatory
Validated internal ID
issued by the
authServer upon
successful login.
Appears in CDR
Optional
User Defined
0%
Optional
p_MainBalance amount
Delta
CORBA::Long
Optional
Delta aount to be
applied to Main account.
100000 units = 1 whole
unit, positive or negative
p_MainExpiryD
ate
eFieldType::TD
ateTime
Null
Optional
p_TransactionT TransactionTyp
ype
e
CORBA::Short
None
None
directFundTransfer
102
103
104
11
12
expiryDate
Payment Interface
5035581/9
34
106
Place Holder
Parameter
Type
p_PeriodicBala
nceDelta
periodicAmount CORBA::Long
Required
Description
Optional
Delta amount to be
applied to Periodic
Account. 100000 units =
1 whole amount, positive
or negative
p_PeriodicExpir periodicExpiry
yDate
eFieldType::TD
ateTime
Null
Optional
Date Subscribers
Periodic Account
expires.Default value of
1/1/1970 0:0:0 is entered
if left blank. This is date
is a null value and is
ignored by the operation,
therefore date(s) is/are
not adjusted.
p_BonusBalanc bonusAmount
eDelta
CORBA::Long
Optiional
Delta amount to be
applied to Bonus
Account. 100000 units =
1 whole amount, positive
or negative
p_BonusExpiry
Date
eFieldType::TD
ateTime
Null
Optional
p_SmBalanceD smAmount
elta
CORBA::Long
Optional
Delta amount to be
applied to SM Account.
100000 units = 1 whole
amount, positive or
negative
p_SmExpiryDat smExpiry
e
eFieldType::TD
ateTime
Null
Optional
Date Subscribers SM
Account expires. Default
value of 1/1/1970 0:0:0
is entered if left blank.
This is date is a null
value and is ignored by
the operation, therefore
date(s) is/are not
adjusted.
p_DataBalance
Delta
dataAmount
CORBA::Long
Optional
Delta amount to be
applied to Data Account.
100000 units = 1 whole
amount, positive or
negative
p_DataExpiryD
ate
dataExpiry
eFieldType::TD
ateTime
Null
Optional
bonusExpiry
Payment Interface
5035581/9
35
108
629
4.11.1.2.
Place
Holder13
op_OnlineFundTransfer
Parameter
p_OperationTy OperationType
pe
Type
eFundTransfer
Op
None
Required
Description
Key
Type of payment
operation:
op_OnlineFundTransfer
p_SubID
subId
CORBA::String
30
p_OperatorId
OperatorId
CORBA::Long
None
p_TransactionT TransactionTyp
ype
e
None
None
Key
Unique Prepaid
Subscriber number
Mandatory
Validated internal ID
issued by the
authServer upon
successful login.
Appears in CDR
CORBA::Short
Optional
User Defined
Optional
Delta aount to be
applied to Main account.
100000 units = 1 whole
unit, positive or negative
p_MainExpiryD
elta
Null
Optional
Optional
Delta amount to be
applied to Bonus
Account. 100000 units =
1 whole amount, positive
or negative
p_BonusExpiry
Delta
Null
Optional
Optional
Delta amount to be
applied to Short
Message Account.
100000 units = 1 whole
amount, positive or
negative
p_SmExpiryDelt SmExpiryDelta
a
Null
Optional
onlineFundTransfer
MainExpiryDelt
a
CORBA::Short
BonusExpiryDel CORBA::Short
ta
CORBA::Short
p_DataBalance
Delta
DataBalanceDel CORBA::Long
ta
Optional
Delta amount to be
applied to Data Account.
100000 units = 1 whole
amount, positive or
negative
p_DataExpiryD
elta
DataExpiryDelta CORBA::Short
Null
Optional
Reserved
Reserved
p_Reserved024 Reserved
109
110
13
Reserved
Reserved
Place Holder is a CORBA::Short that is used to identify each field. These are defined in the
directFundTransferOp in the TPEDefs.idl
Payment Interface
5035581/9
36
112
630
4.11.2.
Place
Holder14
Parameter
Type
MajorCode
result
CORBA::Short
Result of operation
r_MinorCode
transferResult
CORBA::Short
r_ServiceStatus serviceStatus
CORBA::Short
5 - Suspended by Errors
6 - Suspended by Max Bal
7 - Suspended by PIN
8 Suspended Frozen
r_AccountStatu
s
accountStatus
CORBA::Short
3 - Recharge Expired
4 - Disconnected
5 - Shutdown
r_ProfileId
profileId
CORBA::Short
r_SubOptions
subOptions
CORBA::Long
IVR_query_charging_expiry value
r_ivrCounter
IVR_query_counter value
ivrCounter
CORBA::Short
Balance un-applied
r_Account
Balance
accountBalance CORBA::Long
r_ExpiryDate
expiryDate
eFieldType::TD
ateTime
r_PeriodicExpir
y
PeriodicExpiry
eFieldType::TDa
teTime
r_BonusBalanc
e
bonusBalance
CORBA::Long
r_BonusExpiry
bonusExpiry
eFieldType::TDa
teTime
r_SmBalance
smBalance
CORBA::Long
r_SmExpiry
smExpiry
r_DataBalance
dataBalance
r_DataExpiry
dataExpiry
eFieldType::TDa
teTime
CORBA::Long
eFieldType::TDa
teTime
631
113
114
14
Place Holder is a CORBA::Short used to identify each field. These are defined in the fundTransferOp in the
TPEDefs.idl
Payment Interface
5035581/9
37
116
632
4.11.3.
Description
Success
Invalid Amount
Temporary Error
Invalid Voucher
10
CDR Error
633
4.12.
634
PaymentEngine::FundAccountTransfer
635
636
637
638
639
640
This Operation allows the transfer of funds into/from any balance of any account. This
operation accepts tincSeq and recordSeq in inout parameters and supports DFT and OFT
operations. Several accounts may be recharged at once using this operation by inputing a
separate tincSeq within the recordSeq, for each account. A separate TOCS recharge-format
CDR is generated for each account that is affected. Voice format CDRs will not be sent. As
defined in PaymentEngine.idl.
641
FundTransferOp::eFundTransferResult
642
643
644
raises (Pi_exception);
645
6464.12.1.1.
647_pSeq Parameters
648
649
650
PARAMETER
p_SubId
TYPE
CORBA::String
REQ.
Required
DESCRIPTION
The Subscribers Id
Payment Interface
5035581/9
38
118
p_OperatorId
CORBA::Long
Required
p_OperationType
CORBA::Short
Required
p_TransactionType
CORBA::Short
Optional
TransactionType
p_RechargeDiscount
CORBA::Short
Optional
RechargeDiscount
651
652_rSeq Parameters
653
654
Each tincSeq within the recordSeq (_rSeq) will contain information on an account to be
recharged and will contain the following parameters.
655
656
TYPE
DESCRIPTION
p_AccountType
CORBA::Short
p_BalanceId
CORBA::Short
p_BalanceDelta
CORBA::Long
p_ExpiryDate
EfieldType::dtime
p_ExpiryDelta
CORBA::Short
p_PlanId
CORBA::Short
p_PackageId
CORBA::Short
p_VoucherType
CORBA::Short
657
6584.12.1.2.
659
660
Each tincSeq within the recordSeq (_rSeq) will contain information on the account that
was recharged.
661
662
TYPE
DESCRIPTION
r_MajorCode
CORBA::Short
Result of operation.
r_MinorCode
CORBA::Short
r_SubId
CORBA::String
Subscriber Id
r_AccountType
CORBA::Short
0 == Voice(Future Use)
1 == Event
Payment Interface
5035581/9
39
120
PARAMETER
TYPE
DESCRIPTION
2 == Data
3 == MMS
r_BalanceId
CORBA::Short
r_TariffPlanId
CORBA::Short
r_BalanceAmount
CORBA::Long
r_BalanceUnits
CORBA::Short
r_BalanceExpiry
EfieldType::dtime
663
Payment Interface
5035581/9
40
122
6644.12.1.3.
Description
OK
100
101
110
111
112
120
121
122
123
130
131
150
151
152
200
Temporary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
665
4.13.
666
667
668
669
PaymentEngine::accountUpdate
Used to update the subscribers accountStatus and expiryDate. If the accountStatus is being
updated from Normal (2) to RechargeExpired (3), then the subscribers accountBalance will
be reset to 0 balance.
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
670
Payment Interface
5035581/9
41
124
TINC::is
inferred
671
672
673
4.13.1.
674
Input Parameters
675
PARAMETER
TYPE
Max.
Size
DEFAULT
REQ.
DESCRIPTION
30
None
key
subId
CORBA::String
accountStatus
CORBA::Short
None
mandatory
expiryDate
eFieldType::dti
me
None
mandatory
transactionType
CORBA::Short
None
mandatory
User defined
operatorId
CORBA::Long
None
mandatory
676
4.13.2.
677
Transaction Tag
Type
20
ACC_STATUS_EXPIRED_TO_DI
SC
ACC_STATUS_DISC_TO_SHUTD
OWN
EXPIRED_BALANCE_ZEROED
24
SUSPENDED_FRAUD
25
SUSPENDED_ERRORS
26
SUSPENDED_BALANCE
78
ACCOUNT_UPDATE_CC
13
14
Description
Account status change: recharge expired
disconnected
Account status change: disconnected shutdown
Account balance set to zero when expiry date
reached.
Suspended due to exceeding maximum for recharge
fraud counter
Suspended due to exceeding maximum for recharge
error counter
Suspended due to exceeding maximum balance
Account_status transition other than normal
lifecycle.
678
Payment Interface
5035581/9
42
126
4.13.3.
679
Value
Description
OK
100
101
110
111
120
121
122
123
130
131
150
151
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
680
4.14.
681
PaymentEngine::accountUpdateSeq Operation
682
683
684
685
686
687
688
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
689
short accountUpdateSeq(inout tincSeq pSeq,
inout recordSeq rSeq)
raises (Pi_exception);
690
691
Payment Interface
5035581/9
43
128
4.14.1.
692
693
Input Parameters
TYPE
Max.
Size
DEFAULT
REQ.
DESCRIPTION
30
None
key
subId
CORBA::String
accountStatus
CORBA::Short
None
mandatory
expiryDate
eFieldType::dti
me
None
mandatory
transactionType
CORBA::Short
None
mandatory
User defined
operatorId
CORBA::Long
None
mandatory
isFinalCall
CORBA::Boole
an
None
mandatory
694
4.14.2.
695
Transaction Tag
Type
Description
13
14
20
24
SUSPENDED_FRAUD
25
SUSPENDED_ERRORS
26
SUSPENDED_BALANCE
78
ACCOUNT_UPDATE_CC
696
4.14.3.
697
Description
OK
Payment Interface
5035581/9
44
130
Value
Description
100
101
110
111
120
121
122
123
130
131
150
151
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
699
4.15.
700
701
PaymentEngine::accountQuery
This operation is used to query a Subscribers account.
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
702
Payment Interface
5035581/9
45
132
TINC::is
inferred
703
704
705
4.15.1.
706
PARAMETER
Input Parameters
TYPE
subId
CORBA::String
operatorId
CORBA::Long
Max.
Size
DEFAULT
REQ.
DESCRIPTION
30
None
Key
None
Mandatory
707
4.15.2.
708
Description
OK
100
101
110
111
120
121
122
123
130
131
150
151
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
Payment Interface
5035581/9
46
134
709
4.16.
710
PaymentEngine::accountQuerySeq Operation
711
712
713
714
715
short accountQuerySeq(inout tincSeq pSeq,
inout recordSeq rSeq)
raises (Pi_exception);
716
717
718
4.16.1.
719
720
Input Parameters
TYPE
Max.
Size
DEFAULT
REQ.
DESCRIPTION
30
None
Key
subId
CORBA::String
operatorId
CORBA::Long
None
Mandatory
isFinalCall
CORBA::Boole
an
None
Mandatory
721
4.16.2.
722
Payment Interface
5035581/9
Description
OK
100
101
110
111
47
136
Value
Description
120
121
122
123
130
131
150
151
200
Temporoary Error
201
Quality of Service
202
Service Outage
210
Fatal Error
400
Programming Error
723
4.17.
724
725
726
727
728
paymentEngine::packageRecharge Operation
The packageRecharge synchronous operation is used to recharge a subscribers
Commercial, Tailored Commercial, Promotional and Refund packages. The account type
and the id of the package to be used is received as input. The account type determines
which account (Event [SM], Session [Data], etc.) the recharge should be applied to.
packageRechargeOp::ePackageRechargeResult
packageRecharge (in tincSeq pSeq)
raises (Pi_exception);
730
731
732
733
734
735
736
PARAMETER
ID
TYPE
REQ.
DESCRIPTION
SubId
PackageRechargeOp::SubId
String
Required
Subscriber ID
OperatorId
PackageRechargeOp::OperatorId
Long
Required
Operator ID
AccountType
PackageRechargeOp::AccountType
Short
Required
Payment Interface
5035581/9
48
138
TINAccountType::eTINA
ccountTypeAtt (defined
in TINTocsDefs.idl)
should be used to define
this.
PackageId
PackageRechargeOp::PackageId
Long
Required
ID of the package.
RechargePolicy
PackageRechargeOp::RechargePolicy
Short
Optional
Cumulative or overwrite
recharge policy.
PackageRechargeOp::e
PackageRechargePolicy
Att (defined in
TPEDefs.idl) should be
used to define this.
Amount
PackageRechargeOp::Amount
Long
Optional
Cost
PackageRechargeOp::Cost
Long
Optional
Expiry
PackageRechargeOp::Expiry
TDate
Time
Optional
737
4.17.2.
738
ID
219
DESCRIPTION
Package Recharge.
739
4.17.3.
740
741
742
743
744
Result Code Enum
Value
Description
PackageRechargeOp::OK
Success.
PackageRechargeOp::InvalidSu
bscriberId
PackageRechargeOp::Subscrib
erDoesNotExist
Payment Interface
5035581/9
49
140
Value
Description
PackageRechargeOp::InvalidOp
eratorId
PackageRechargeOp::InvalidAc
countType
PackageRechargeOp::AccountN
otEnabled
PackageRechargeOp::InvalidRe
chargePolicy
PackageRechargeOp::InvalidPa
ckageId
PackageRechargeOp::Package
NotFound
PackageRechargeOp::Package
NotUseable
PackageRechargeOp::PackageI
dMismatch
10
PackageRechargeOp::InvalidSe
rviceState
11
PackageRechargeOp::Operation
NotAvailable
12
PackageRechargeOp::InvalidPa
ramType
13
PackageRechargeOp::InvalidPa
ramCount
14
PackageRechargeOp::Insufficie
ntFunds
15
PackagerechargeOp::InvalidCos
t
16
Temporary Error.
PackagerechargeOp::InvalidAm
ount
17
Environmental Error.
PackagerechargeOp::InvalidExp
iryDate
18
Fatal Error.
PackagerechargeOp::PackageP
oolFull
19
PackageRechargeOp::Temporar
yError
20
PackageRechargeOp::Environm
entError
21
PackageRechargeOp::FatalErro
r
22
Payment Interface
5035581/9
50
142
4.17.4.
745
Package Refund
746
747
The Package Recharge functionality can be used in conjunction with dailyRun and ccRun
to refund packages.
748
749
750
751
752
4.17.4.1.
753
754
The following table describes the parameters included in the file, which is processed by
either ccRun or dailyRun to refund packages.
755
Parameter
Description
packageRecharge
Operation
TranId
SubId
SubId
AccountType
Event 1, or Data 2
PackageId
Recharge Policy
0 Overwrite, 1 Cumulative
756
757
4.17.4.2.
758
A sample refund entry for subscriber 0612313 of the Event account is as follows:
759
packageRecharge,0,0612313,1,1,1
760
Payment Interface
5035581/9
51
144
4.18.
761
762
PaymentEngine::voucherRecharge Operation
This is the synchronous version of the voucher recharge method.
763
764
765
Input Parameters
PARAMETER
TYPE
DEFAULT
REQ.
DESCRIPTION
Subid
CORBA::String
Key
Voucher
CORBA::String
operatorId
CORBA::Long
4.18.2.
766
Transaction Type
Tag
CC VOUCHER_RECHARGE
34
Subscriber number
Description
CC Voucher Recharge
767
4.18.3.
768
Return Code
769
This operation is synchronous and returns the PE_AccountDetails structure defined in the
770
PaymentEngine interface.
PARAMETER
Result
TYPE
CORBA::short
DEFAULT
None
REQ.
Numeric
DESCRIPTION
Defined result values are as follows:
0 Successful
1 Incorrect account number
2 Account in an invalid state
3 Incorrect amount
4 Fatal Error
5 Voucher Queue Full
6 Service Status inactive
7 Service Outage
8 Invalid Voucher
9 Voucher not found
Payment Interface
5035581/9
52
146
PARAMETER
TYPE
DEFAULT
REQ.
DESCRIPTION
10 Error sending a CDR or Mediation
File
11 Successful, amountBalance is nonzero (directDebitTransfer)
transferResult
CORBA::short
None
Numeric
Transfer Result
accountBalance
CORBA::long
None
Numeric
serviceStatus
CORBA::short
None
Numeric
0 - Inactive
1 - Active
2 Suspended
3 - Stolen
4 - Suspended by Fraud
5 - Suspended by Errors
6 Suspended by Max Bal
7 Suspended by Pin
8 Suspended by Frozen
accountStatus
CORBA::short
None
Numeric
expiryDate
EFieldType::dtime
None
Valid Date
Time
Expiry date
profileId
CORBA::short
None
Numeric
Profile Id
subOptions
CORBA::long
None
Numeric
Sub Options
ivrQueryExpiryDate
EFieldType::dtime
None
Valid Date
Time
ivrQueryCounter
CORBA::short
None
Numeric
amountBalance
CORBA::long
None
Numeric
Balance un-applied
lastRechargeDate
EFieldType::dtime
None
Valid Date
Time
perioidcBalance
CORBA::long
None
Numeric
Periodic Balance
periodicExpiry
EFieldType::dtime
None
Valid Date
Time
Periodic Expiry
periodicStatus
CORBA::short
None
Numeric
bonusBalance
CORBA::long
None
Numeric
Bonus Balance
bonusExpiry
EFieldType::dtime
None
Valid Date
Bonus Expiry
Payment Interface
5035581/9
53
148
PARAMETER
TYPE
DEFAULT
REQ.
DESCRIPTION
Time
smBalance
CORBA::long
None
Numeric
SM Balance
smExpiry
EFieldType::dtime
None
Valid Date
Time
SM Expiry
dataBalance
CORBA::long
None
Numeric
Data Balance
dataExpiry
EFieldType::dtime
None
Valid Date
Time
Date Expiry
overdraftBalance
CORBA::long
None
Numeric
Overdraft Balance
771
4.19.
772
ASyncEngine::voucherRecharge Operation
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
773
TINC:: is
inferred
774
775
776
Input Parameters
Parameter
Type
Subid
Required
Description
CORBA::String
Key
Subscriber number
CallingPartyNumber
CORBA::String
Mandatory
Voucher
CORBA::String
Mandatory
Voucher Number.
LocationId
CORBA::String
Mandatory
ThisVoucherErrors
CORBA::Short
Mandatory
TransactionType
CORBA::Short
Mandatory
Default
Payment Interface
5035581/9
54
150
Parameter
Type
transactionDate
Required
Description
eFfieldType::dtim
e
Mandatory
corrleationSource
CORBA::Short
Mandatory
corrleationId
CORBA::Short
Mandatory
operatorId
CORBA::Long
Mandatory
4.19.2.
777
Default
Transaction Tag
Type
Description
IVR_VOUCHER_RECHARGE
34
CC VOUCHER_RECHARGE
CC Voucher Recgarge
778
4.19.3.
779
780
781
Return Code
The voucher recharge operating is asynchronus and returns a job number. This number
must be used with the VoucherJobMgr::getJobDetails to get return codes.
7824.20.
ASyncEngine::voucherRechargeSeq Operation
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
783
CORBA::Long voucherRechargeSeq(inout tincSeq pSeq,
inout recordSeq rSeq)
raises (Pi_exception);
784
785
786
787
Input Parameters
Parameter
Type
Subid
Required
Description
CORBA::String
Key
Subscriber number
CallingPartyNumber
CORBA::String
Mandatory
Voucher
CORBA::String
Mandatory
Voucher Number.
LocationId
CORBA::String
Mandatory
ThisVoucherErrors
CORBA::Short
Mandatory
TransactionType
CORBA::Short
Mandatory
Payment Interface
5035581/9
Default
55
152
Parameter
Type
Default
Required
Description
transactionDate
eFfieldType::dtim
e
Mandatory
corrleationSource
CORBA::Short
Mandatory
corrleationId
CORBA::Short
Mandatory
operatorId
CORBA::Long
Mandatory
None
788
4.20.2.
789
Transaction Tag
Type
Description
IVR_VOUCHER_RECHARGE
34
CC VOUCHER_RECHARGE
CC Voucher Recgarge
790
4.20.3.
791
792
793
Return Code
The voucher recharge operating is asynchronus and returns a job number. This number
must be used with the VoucherJobMgr::getJobDetails to get return codes.
794
4.21.
795
VoucherJobMgr::getJobDetails Operation
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
796
TINC:: is
inferred
797
798
799
Payment Interface
5035581/9
56
154
4.21.1.
800
Input Parameters
Parameter
Type
jobNo
vjd
4.22.
801
Default
Required
Description
CORBA::Long
Key
VoucherJobDetail
s
Mandatory
802
Type
Field
Description
CORBA::Short
opState
CORBA::String
subId
Subscriber Number
CORBA::Short
serviceStatus
Service Status
0:
1:
2:
3:
4:
5:
6:
7:
8:
CORBA::Short
accountStatus
Inactive
Active
SuspendedManually
Stolen
SuspendedFraud
SuspendedErrors
SuspendedMaxBalance
SuspendedInvalidPin
Frozen (Blocked)
Account Status
1:
2:
3:
4:
5:
FirstTime
Normal
RechargeExpired
Disconnected
Shutdown
CORBA::Long
accountBalance
TDateTime
expiryDate
CORBA::Long
periodicBalance
TDateTime
periodicExpiry
CORBA::Long
bonusBalance
TDateTime
bonusExpiry
CORBA::Long
smBalance
SM Balance (100,000 == 1)
TDateTime
smExpiry
CORBA::Long
dataBalance
Payment Interface
5035581/9
57
156
Type
Field
Description
TDateTime
dataExpiry
CORBA::Long
smBonusBalance
CORBA::Long
dataBonusBalance
TDateTime
suspendDate
CORBA::Short
rechargeFraudCounter
CORBA::Short
totalRechargeErrorCounter
CORBA::Short
balanceNotificationStatus
CORBA::Short
expiryNotificationStatus
CORBA::Short
smBalanceNotificationStatus
Sm Balance Notification
Status
CORBA::Short
smExpiryNotificationStatus
CORBA::Short
profileID
Profile ID
CORBA::Long
subOptions
TDateTime
ivrQueryExpiryDate
CORBA::Short
ivrQueryCounter
CORBA::Short
discountPercentage
Discount Percentage
CORBA::Long
overdraftBalance
CORBA::Long
overdraftActualValue
CORBA::Long
periodicBalance
TDateTime
periodicExpiry
CORBA::Long
bonusBalance
The following Parameter releate to the voucher that has been recharged
CORBA::Short
voucherType
Voucher Type
CORBA::Short
currencyCode
Currency Code
CORBA::Short
tariffPlanId
Tariff Plan Id
CORBA::String
voucherNo
Voucher No
CORBA::Long
faceValue
CORBA::Long
actualValue
Payment Interface
5035581/9
58
158
Type
Field
Description
CORBA::Long
bonusFaceValue
CORBA::Long
bonusActualValue
CORBA::Long
smFaceValue
CORBA::Long
smActualValue
CORBA::Long
dataFaceValue
CORBA::Long
dataActualValue
CORBA::Long
extBonusAmount
TDateTime
transactionDate
CORBA::Short
voucherSubType
TDateTime
voucherExpiry
CORBA::Long
smBonusFaceValue
CORBA::Long
smBonusActualValue
CORBA::Long
dataBonusFaceValue
CORBA::Long
dataBonusActualValue
CORBA::Long
packageId
CORBA::Long
smPackageId
CORBA::Long
dataPackageId
803
804
805
Payment Interface
5035581/9
Result
Description
Success
59
160
Result
Description
100
101
ValueOutOfRange
103
InvalidParamType
104
InvalidParamCount
105
InvalidSubscriberId
106
InvalidVoucherNumber
107
VoucherNotPermitted
110
InvalidAccountStateError
111
InvalidServiceStateError
112
InvalidAccountError
120
MaxRechargeValueError
121
MaxChargeValueError
123
MinBalanceError
130
MaxRechargeFraudsError
131
MaxTotalRechargeError
150
VTTVoucherTypeError
151
VoucherQueueError
152
VoucherDenominationError
153
InvalidExpiryTypeError
160
InvalidVoucherError
161
VoucherNotFound
162
ExpiredVoucherError
163
DuplicateVoucherError
164
InvalidSecurityCodeError
165
VoucherAlreadyUsedBySub
170
MediationControlEnableTError
(Success)
171
MediationControlEnableOErro
r (Success)
172
MediationControlOtherError
(Success)
180
CDRErrorRechargeSuccessInt
(Success)
181
CDRErrorRechargeSuccessE
xt (Success)
182
CDRErrorQualityOfServiceRe
charge
183
CDRErrorQualityOfServiceRoll
back
184
CDRErrorServiceOutage
Payment Interface
5035581/9
60
162
8064.23.
Result
Description
185
CDRErrorRollbackFailureInt
186
CDRErrorRollbackFailureExt
187
CDRErrorCommitFailureExt
188
NoVoucherTypesForPrepaidS
ervice
189
VoucherTypeNotPermitted
190
TVMVoucherTypeError
191
CreditAmountLookupError
192
ExternalEngineUnavailable
193
ExternalJob
194
EnvironmentError
200
TemporaryError
201
QualityOfService
202
ServiceOutage
203
CommsError
210
FatalError
220
ProgrammingError
VoucherJobMgr::getJobDetailsSeqOperation
Caution: The TINC package name space is inferred automatically in order to comply with Java 1.4.x
807
CORBA::Long voucherRechargeSeq(inout tincSeq pSeq,
inout recordSeq rSeq)
raises (Pi_exception);
808
809
810
811
Input Parameters
Parameter
Type
jobNo
vjd
4.24.
812
813
Default
Required
Description
CORBA::Long
Key
VoucherJobDetail
s
Mandatory
Payment Interface
5035581/9
61
164
814
Type
Field
Description
CORBA::Short
opState
CORBA::String
subId
Subscriber Number
CORBA::Short
serviceStatus
Service Status
0:
1:
2:
3:
4:
5:
6:
7:
8:
CORBA::Short
accountStatus
Inactive
Active
SuspendedManually
Stolen
SuspendedFraud
SuspendedErrors
SuspendedMaxBalance
SuspendedInvalidPin
Frozen (Blocked)
Account Status
1:
2:
3:
4:
5:
FirstTime
Normal
RechargeExpired
Disconnected
Shutdown
CORBA::Long
accountBalance
TDateTime
expiryDate
CORBA::Long
periodicBalance
TDateTime
periodicExpiry
CORBA::Long
bonusBalance
TDateTime
bonusExpiry
CORBA::Long
smBalance
SM Balance (100,000 == 1)
TDateTime
smExpiry
CORBA::Long
dataBalance
TDateTime
dataExpiry
CORBA::Long
smBonusBalance
CORBA::Long
dataBonusBalance
TDateTime
suspendDate
CORBA::Short
rechargeFraudCounter
CORBA::Short
totalRechargeErrorCounter
CORBA::Short
balanceNotificationStatus
Payment Interface
5035581/9
62
166
Type
Field
Description
CORBA::Short
expiryNotificationStatus
CORBA::Short
smBalanceNotificationStatus
Sm Balance Notification
Status
CORBA::Short
smExpiryNotificationStatus
CORBA::Short
profileID
Profile ID
CORBA::Long
subOptions
TDateTime
ivrQueryExpiryDate
CORBA::Short
ivrQueryCounter
CORBA::Short
discountPercentage
Discount Percentage
CORBA::Long
overdraftBalance
CORBA::Long
overdraftActualValue
CORBA::Long
periodicBalance
TDateTime
periodicExpiry
CORBA::Long
bonusBalance
The following Parameter releate to the voucher that has been recharged
CORBA::Short
voucherType
Voucher Type
CORBA::Short
currencyCode
Currency Code
CORBA::Short
tariffPlanId
Tariff Plan Id
CORBA::String
voucherNo
Voucher No
CORBA::Long
faceValue
CORBA::Long
actualValue
CORBA::Long
bonusFaceValue
CORBA::Long
bonusActualValue
CORBA::Long
smFaceValue
CORBA::Long
smActualValue
CORBA::Long
dataFaceValue
CORBA::Long
dataActualValue
Payment Interface
5035581/9
63
168
Type
Field
Description
CORBA::Long
extBonusAmount
TDateTime
transactionDate
CORBA::Short
voucherSubType
TDateTime
voucherExpiry
CORBA::Long
smBonusFaceValue
CORBA::Long
smBonusActualValue
CORBA::Long
dataBonusFaceValue
CORBA::Long
dataBonusActualValue
CORBA::Long
packageId
CORBA::Long
smPackageId
CORBA::Long
dataPackageId
815
4.25.
816
PI Exceptions
4.25.1.
817
General Error
Code
Description
INCOMPLETE_STRUCT. IDL struct recieved was not fully populated by the client
Payment Interface
5035581/9
64
170
General Error
Code
Description
10
11
12
4.25.2.
818
IDL GW Specific
Error Codes
Description
100
MAX_TRANSACTIONS_EXCEEDED
101
102
103
104
105
819
4.25.3.
820
202
203
204
205
206
207
208
209
210
211
212
213
214
215
RANGE_EXCEEDED. Cannot allocate range this size with the MIN supplied - range is
too big
216
Payment Interface
5035581/9
65
172
218
219
220
221
222
223
224
821
4.25.4.
822
Voucher Error
Codes
Description
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
INCORRECT_VOUCHER_STATE. INCORRECT_VOUCHER_STATE
519
520
521
Payment Interface
5035581/9
66
174
Voucher Error
Codes
Description
522
523
524
525
526
527
528
529
530
531
532
533
823
4.25.5.
824
902
903
904
905
906
825
4.25.6.
826
PayementEngine
Error Codes
Description
1001
1002
1003
1004
1005
1006
1007
Payment Interface
5035581/9
67
176
PayementEngine
Error Codes
Description
1008
1009
1010
1011
827
Payment Interface
5035581/9
68
178
Appendix A: AuthFactory.idl
828
829
830
/opt/TINCpsp/4.38/examples/cpp
831
/opt/TINCpsp/4.38/examples/java
832
833
Payment Interface
5035581/9
69
180
Appendix B: Exceptions.idl
834
835
836
/opt/TINCpsp/4.38/examples/cpp
837
/opt/TINCpsp/4.38/examples/java
838
839
840
Payment Interface
5035581/9
70
182
Appendix C: TINCdefs.idl
841
842
843
/opt/TINCpsp/4.38/examples/cpp
844
/opt/TINCpsp/4.38/examples/java
845
846
847
Payment Interface
5035581/9
71
184
Appendix D: Types.idl
848
849
850
851
/opt/TINCpsp/4.38/examples/cpp
852
/opt/TINCpsp/4.38/examples/java
853
854
Payment Interface
5035581/9
72
186
Appendix E: PaymentEngine.idl
855
856
857
858
/opt/TINCpsp/4.38/examples/cpp
859
/opt/TINCpsp/4.38/examples/java
860
861
Payment Interface
5035581/9
73
188
Appendix F: AuthFactory_impl.java
862
863
864
/opt/TINCpsp/4.38/examples/cpp
865
/opt/TINCpsp/4.38/examples/java
866
867
Payment Interface
5035581/9
74
190
868
import java.io.*;
869
import java.util.*;
870
import org.omg.CORBA.*;
871
import tinc.*;
872
class AuthFactory_impl
873
874
//////////////////////////////////////////
875
876
//////////////////////////////////////////
877
878
879
880
881
882
883
884
885
886
= new String();
887
888
iorFileName = _iorFileName;
889
program_args = args;
890
readAuthIORFile();
891
892
if(initFactory())
893
894
895
connected = true;
896
897
else
898
899
900
connected = false;
}
901
902
903
904
905
906
907
908
909
910
911
912
if(factoryObj == null)
913
Payment Interface
5035581/9
75
192
914
915
return false;
916
917
918
try
919
920
authFactory = AuthFactoryHelper.narrow(factoryObj);
921
922
if(authFactory == null)
923
924
925
return false;
}
926
927
928
catch (COMM_FAILURE e)
929
{
Trace.traceException(1,e);
930
return false;
931
932
933
catch (SystemException e)
934
{
Trace.traceException(1,e);
935
return false;
936
937
938
catch (Exception e)
939
{
Trace.traceException(1,e);
940
return false;
941
942
943
944
945
946
947
948
949
950
951
952
953
954
try
955
956
if (!fileToParse.canRead())
957
958
959
Payment Interface
5035581/9
76
194
960
961
System.exit(-1);
}
962
963
964
catch (Exception e)
965
966
Trace.traceException(1,e);
967
968
System.exit(-1);
969
970
971
try
972
973
974
975
iorString = dis.readLine() ;
}
976
977
978
979
980
//
981
// This method will validate the user with the AuthServer and give back a
982
// List of IOR's to servers and keys which that user can connect to
983
// NOTE: Administrator and Operator users should be able to talk to all servers
984
// NOTE: If the server itself did not register with the AuthServer it's IOR
985
//
986
//
987
988
will not be known, make sure the server you wish to connect to is running
989
990
991
992
993
994
if(!connected)
return uf;
995
996
997
if(authFactory == null)
998
{
Trace.trace(1,"PaymentClient :> authFactory Object is not a factory");
999
return uf;
1000
1001
1002
1003
try
1004
{
// Talk with the AuthServer
1005
Payment Interface
5035581/9
77
196
1006
1007
uf = authFactory.login(User,Password,sSeq);
1008
1009
1010
1011
1012
return uf;
1013
1014
catch(NullPointerException e)
1015
1016
1017
return uf;
1018
1019
catch (COMM_FAILURE e)
1020
1021
1022
return uf;
1023
1024
catch (SystemException e)
1025
1026
Trace.traceException(1,e);
1027
return uf;
1028
1029
catch (Exception e)
1030
1031
Trace.traceException(1,e);
1032
return uf;
}
1033
1034
return uf;
1035
1036
1037
Payment Interface
5035581/9
78
198
Appendix G: PaymentEngine.java
1038
1039
1040
/opt/TINCpsp/4.38/examples/cpp
1041
/opt/TINCpsp/4.38/examples/java
1042
1043
1044
Payment Interface
5035581/9
79
200
1045
import java.io.*;
1046
import java.util.*;
1047
import org.omg.CORBA.*;
1048
import java.net.*;
1049
import tinc.*;
1050
1051
1052
1053
1054
1055
1056
1057
1058
paymentEngine = _paymentEngine;
1059
operatorId = _operatorId;
1060
1061
1062
//
1063
1064
// The paymentEngine will return details of the request and the subscriber.
1065
// Note: These details will only be valid on a succesfull request, as defined by the result.
1066
//
1067
1068
1069
1070
1071
PE_AccountDetails ad;
1072
1073
try
1074
{
// Talk withe the paymentEngine
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
TDateTime _expiryDate;
expiryDate.day = 1;
expiryDate.month = 1;
expiryDate.year = 1970;
expiryDate.hour = 0;
expiryDate.minute = 0;
expiryDate.second = 0;
ad = paymentEngine.directFundTransfer(_subid,_amount,_rechargeDiscountRate,_expiryDate_transactionType,
operatorId);
1088
1089
1090
1091
1092
{
Trace.trace(1,"PaymentClient :> Exception:COMM_FAILURE");
1093
Payment Interface
5035581/9
80
202
1094
Trace.traceException(1, corbEx);
1095
1096
1097
1098
1099
Trace.traceException(1, systemEx);
1100
1101
catch(Exception ex)
1102
1103
1104
Trace.traceException(1, ex);
}
1105
return ad;
1106
1107
1108
1109
1110
1111
1112
1113
PE_AccountDetails ad;
1114
1115
try
1116
1117
1118
ad = paymentEngine.directDebitTransfer(_subid,_amount,_transactionType,operatorId);
1119
1120
1121
1122
1123
Trace.traceException(1, corbEx);
1124
1125
1126
1127
1128
Trace.traceException(1, systemEx);
1129
1130
catch(Exception ex)
1131
1132
1133
Trace.traceException(1, ex);
1134
1135
return ad;
}
1136
1137
1138
Payment Interface
5035581/9
81
204
1139
Appendix H: RechargeClient.java
1140
1141
/opt/TINCpsp/4.38/examples/cpp
1142
/opt/TINCpsp/4.38/examples/java
1143
1144
1145
Payment Interface
5035581/9
82
206
1146
////////////////////////////////////////////////////////////////////////////////
1147
1148
//
1149
// $Workfile: rechargeClient.java $
1150
1151
//
1152
// Description:
1153
1154
//////////////////////////////////////////////////////////////////////////////////
1155
1156
import java.io.*;
1157
import java.util.*;
1158
import org.omg.CORBA.*;
1159
import java.net.*;
1160
import tinc.*;
1161
1162
1163
1164
1165
1166
1167
1168
// The key that will be used to get and release engines from the server
1169
1170
1171
1172
1173
1174
// Note: This will be the operator that can be seen on the CDR
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
// Step 1. validate the user with the AuthServer and get a IOR List
Payment Interface
5035581/9
83
208
1192
1193
1194
1195
//
1196
//
1197
// Note : If the key is not the one that was returned from the AuthServer
1198
//
1199
1200
1201
1202
1203
1204
1205
1206
try
1207
1208
//
1209
// Step 1. validate the user with the AuthServer and get an IOR List
1210
//
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
UserInfo uf = factory.login(User,Password,serviceKeySeq);
1224
1225
1226
Continue = false;
1227
} else {
1228
1229
1230
operatorId = uf.id;
1231
1232
1233
1234
1235
1236
1237
Payment Interface
5035581/9
84
210
1238
if (Continue)
1239
1240
1241
1242
1243
1244
if(serviceKeySeq.value[i].service == PAYMENT)
1245
{
// extract the key that's later used to login to the paymentEngine Factory
1246
factoryKey = serviceKeySeq.value[i].key;
1247
// extract the CORBA IOR to allow use to connect to the paymentEngine Factory
1248
1249
ior = serviceKeySeq.value[i].ior;
1250
1251
Continue = true;
1252
break;
}
1253
1254
1255
1256
1257
if(Continue)
1258
1259
1260
1261
1262
1263
if(paymentFactoryObj == null)
1264
1265
1266
Continue = false;
}
1267
1268
1269
1270
paymentFactory = PaymentEngine_FactoryHelper.narrow(paymentFactoryObj);
1271
1272
if(paymentFactory == null)
1273
{
Trace.trace(1,"PaymentClient :> paymentFactory Object is not a factory");
1274
Continue = false;
1275
1276
1277
1278
1279
//
1280
1281
1282
if (paymentEngine == null)
1283
Payment Interface
5035581/9
85
212
1284
1285
1286
1287
else
1288
1289
1290
1291
1292
engineId = paymentEngine.engineId();
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
Trace.traceException(1, corbEx);
1304
Continue = false;
1305
1306
1307
1308
1309
Trace.traceException(1, systemEx);
1310
Continue = false;
1311
1312
catch(Exception ex)
1313
1314
1315
Trace.traceException(1, ex);
Continue = false;
1316
1317
1318
1319
return Continue;
}
1320
1321
1322
//
1323
1324
//
1325
1326
1327
1328
1329
Payment Interface
5035581/9
86
214
1330
1331
try
1332
1333
if(factoryKey >= 0)
1334
1335
1336
1337
1338
1339
1340
{
Trace.trace(1,"PaymentClient :> Exception:COMM_FAILURE");
1341
1342
Trace.traceException(1, corbEx);
1343
Continue = false;
1344
1345
1346
1347
1348
Trace.traceException(1, systemEx);
1349
Continue = false;
1350
1351
catch(Exception ex)
1352
1353
1354
Trace.traceException(1, ex);
1355
Continue = false;
1356
1357
1358
return Continue;
1359
1360
1361
1362
1363
1364
1365
while(Continue)
1366
1367
1368
if(option.equals("F"))
1369
1370
System.out.println("directFundTransfer");
1371
directFundTransfer();
1372
1373
else if(option.equals("D"))
1374
{
System.out.println("directDebitTransfer");
1375
Payment Interface
5035581/9
87
216
1376
directDebitTransfer();
1377
1378
else if(option.equals("Q"))
1379
{
Continue = false;
1380
1381
1382
else
1383
{
System.out.println("Invalid Option : " +option);
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
System.out.println("Options:");
1395
System.out.println("(F)irectFundTransfer:");
1396
System.out.println("(D)irectDebitTransfer:");
1397
System.out.println("(Q)uit:");
1398
System.out.println(": ");
1399
1400
1401
1402
try {
1403
option = br.readLine();
1404
1405
1406
System.exit(1);
1407
1408
1409
return option;
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
Payment Interface
5035581/9
88
218
1422
PE_AccountDetails ad;
1423
ad.result = -1;
1424
1425
1426
1427
try {
1428
1429
System.out.println("Sub Id:");
1430
subIdStr = br.readLine();
1431
1432
System.out.println("Amount :");
1433
amountStr = br.readLine();
1434
1435
1436
tranTypeStr = br.readLine();
1437
1438
Continue = true;
1439
1440
1441
ad = paymentEngine_impl.directFundTransfer(subIdStr,
1442
Integer.parseInt(amountStr),
1443
Short.parseShort(tranTypeStr));
1444
1445
1446
1447
1448
Continue = false;
1449
1450
1451
1452
System.out.println("Invalid Number");
1453
Continue = false;
1454
1455
1456
// The Account Details are only valid when the operation was a success
1457
System.out.println("****************************");
1458
System.out.println("");
1459
System.out.println("Result : "+ad.result);
1460
System.out.println("TransferResult : "+ad.transferResult);
1461
1462
1463
1464
1465
1466
1467
Payment Interface
5035581/9
89
220
1468
1469
+ ad.expiryDate.hour + ":"
1470
+ ad.expiryDate.minute + ":"
1471
+ ad.expiryDate.second);
1472
1473
System.out.println("SubOptions : "+ad.subOptions);
1474
1475
+ ad.ivrQueryExpiryDate.month + "/"
1476
1477
+ ad.ivrQueryExpiryDate.hour + ":"
1478
+ ad.ivrQueryExpiryDate.minute + ":"
1479
+ ad.ivrQueryExpiryDate.second);
System.out.println("IVR Query Counter "+ad.ivrQueryCounter);
1480
1481
1482
System.out.println("");
1483
System.out.println("****************************");
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
PE_AccountDetails ad;
1497
ad.result = -1;
1498
1499
1500
1501
try {
1502
1503
System.out.println("Sub Id:");
1504
subIdStr = br.readLine();
1505
1506
System.out.println("Amount :");
1507
amountStr = br.readLine();
1508
1509
1510
tranTypeStr = br.readLine();
1511
1512
Continue = true;
1513
Payment Interface
5035581/9
90
222
1514
1515
ad = paymentEngine_impl.directDebitTransfer(subIdStr,
1516
Integer.parseInt(amountStr),
1517
Short.parseShort(tranTypeStr));
1518
1519
1520
1521
1522
Continue = false;
1523
1524
1525
1526
System.out.println("Invalid Number");
1527
Continue = false;
1528
1529
1530
// The Acount Details are only valid when the operation was a success
1531
System.out.println("****************************");
1532
System.out.println("");
1533
System.out.println("Result : "+ad.result);
1534
System.out.println("TransferResult : "+ad.transferResult);
1535
1536
1537
1538
1539
1540
1541
1542
+ ad.expiryDate.month + "/"
1543
1544
+ ad.expiryDate.hour + ":"
1545
+ ad.expiryDate.minute + ":"
+ ad.expiryDate.second);
1546
1547
1548
System.out.println("SubOptions : "+ad.subOptions);
1549
1550
+ ad.ivrQueryExpiryDate.month + "/"
1551
1552
+ ad.ivrQueryExpiryDate.hour + ":"
1553
+ ad.ivrQueryExpiryDate.minute + ":"
1554
+ ad.ivrQueryExpiryDate.second);
System.out.println("IVR Query Counter "+ad.ivrQueryCounter);
1555
1556
1557
System.out.println("");
1558
System.out.println("****************************");
}
1559
Payment Interface
5035581/9
91
224
1560
1561
1562
1563
System.out.println("usage:");
1564
System.out.println(processName_);
1565
System.out.println("
-U <User Name>");
1566
System.out.println("
-P <Passowrd>");
1567
System.out.println("
-T <Thrace File>");
1568
System.out.println("
1569
1570
1571
1572
1573
int i = 0;
1574
String arg;
1575
1576
//////////////////////////////////////////
1577
1578
//////////////////////////////////////////
1579
1580
{
arg = args[i++];
1581
1582
1583
if (arg.equals("-v"))
1584
{
System.out.println("\nVersion:"+ VERSION_ID+"\n");
1585
1586
1587
else if (arg.equals("-U"))
1588
1589
if (i < args.length)
1590
{
User = (args[i++]);
1591
1592
1593
else
1594
{
System.err.println("[-U] option requires User Name ");
1595
1596
1597
1598
else if (arg.equals("-P"))
1599
1600
if (i < args.length)
1601
{
Password = (args[i++]);
1602
1603
1604
else
1605
Payment Interface
5035581/9
92
226
1606
1607
1608
1609
else if (arg.equals("-I"))
1610
1611
if (i < args.length)
1612
{
AuthIorPath = (args[i++]);
1613
1614
1615
else
1616
{
System.err.println("[-I] option requires Password ");
1617
1618
1619
1620
else if (arg.equals("-T"))
1621
1622
if (i < args.length)
1623
{
Trace.setTraceLevel(5,(args[i++]));
1624
1625
1626
else
1627
{
System.err.println("[-I] option requires Password ");
1628
1629
1630
1631
else
usage(processName);
1632
1633
1634
1635
if(getPaymentEngine(args))
1636
1637
process();
1638
1639
releasePaymentEngine();
}
1640
1641
1642
1643
1644
Payment Interface
5035581/9
93
228
Appendix I: RechargeClient.sh
1645
1646
1647
/opt/TINCpsp/4.38/examples/cpp
1648
/opt/TINCpsp/4.38/examples/java
1649
1650
1651
Payment Interface
5035581/9
94
230
Appendix J: Trace.java
1652
1653
1654
/opt/TINCpsp/4.38/examples/cpp
1655
/opt/TINCpsp/4.38/examples/java
1656
1657
1658
Payment Interface
5035581/9
95
232
Appendix K: SimpleClient.java
1659
1660
1661
1662
/opt/TINCpsp/4.38/examples/cpp
1663
/opt/TINCpsp/4.38/examples/java
1664
1665
Payment Interface
5035581/9
96
234
Appendix L: TPEDefs.idl
1666
1667
1668
/opt/TINCpsp/4.38/examples/cpp
1669
/opt/TINCpsp/4.38/examples/java
1670
1671
1672
Payment Interface
5035581/9
97
236
1673
1674Definitions
1675
1676
1677
1678
IOR
CORBA
1679References
1680
/1/
1681
/2/
1682
/3/
Payment Interface
5035581/9+