{{Api_Method_Spec|'''Description <br/>'''=Triggers the process of registering a credit card in external system SIA. To use this method, user must be logged. <br/>
When UNIAPI receives this request:
# Creates new transaction in GVP_SIA_MICROPAYMENTS (status 0: Pending).
## If user has an active token in GVP_USERS_SIA_CARDS: returns SiaRegisterParams with oldtoken and generates signature for '''modToken''' SIA request.
## Else, returns SiaRegisterParams without oldtoken and generates signature for '''authorise''' SIA request.
# If user has a pending micropayment, returns error (statusCode = 271, statusMessage = WaitingForPendingMicropayment). User will be able to try again when pending micropayment is resumed.
This method only can be used by logged user.
|Parameters=
'''Parameters <br/>'''
{{Api_Parameter|
ParamName=token
|ParamType=String
|ParamRequired=required
|ParamDescription=It is the URL to redirect end user browser at the end of a successful credit card registration/replacement. <br/> :It will be used together with clientUrlKo to generate the real URLOK in this way: Params.URLOK = Instance [BLOCK1]?clientUrlOK=[BLOCK2]&clientUrlKO=[BLOCK3] where:<br/>::BLOCK1 is gvp.sia.api endpoint offering CreditCardController Confirm service which processes SIA successful transactions. This endpoint is configured by operator at instance parameter SIA_URL_OK + . Example: http://sianotification.mca.tid.es/api/creditcard/confirm<br/>::BLOCK2 is URL to redirect end user browser at the end of a successful credit card registration/replacement. This URL is sent by PCClient to gvp.api as input parameter clientUrlOk + to manageCreditCard service. Example: http://vivoplay.mca.tid.es/CreditCardOk<br/>::BLOCK3 is URL to redirect end user browser at the end of a credit card registration/replacement which seems to be OK at SIA side but fails at GVP (e.g. because signature validation fails). This URL is sent by PCClient to gvp.api as input parameter clientUrlKoto manageCreditCard service. Example: http://vivoplay.mca.tid.es/CreditCardFailed
}}
{{Api_Parameter|
|ParamType=String
|ParamRequired=required
|ParamDescription=It is the URL to redirect end user browser at the end of a failed credit card registration/replacement. <br/> :It will be used to generate the real URLKO in this way: URLOK Params.URLKO = Instance [BLOCK1]?clientUrlKO=[BLOCK2] where:<br/>::BLOCK1 is gvp.sia.api endpoint offering CreditCardController Refuse service which processes SIA successful transactions. This endpoint is configured by operator at instance parameter SIA_URL_OK. Example: http://sianotification.mca.tid.es/api/creditcard/refuse<br/>::BLOCK2 is URL to redirect end user browser at the end of a failed credit card registration. This URL is sent by PCClient to gvp.api as input parameter SIA_URL_KO + clientUrlKoto manageCreditCard service. Example: http://vivoplay.mca.tid.es/CreditCardFailed
}}
'''|Returns <br/>'''=Returns a JSON object containing an a [[SiaRegisterParams]] object which represents the list of parameters that must be sent to SIA to call registration card form.
{{!}} New input parameters and new SiaRegisterParams object definition
{{!}}
{{!}}- valign="top"
! 1.2
{{!}} updated definition for Params.URLOK and Params.URLKO
{{!}}
{{!}}}
|SeeAlso=
==== SIGNATURE GENERATION FOR MANAGE CREDIT CARD OPERATIONS (authorise and modToken) ====
As in previous situation, in order to calculate the signature, the table must be taken into account, considering all the rows which has an Y for used for RSA calculation column (so taking all the N/Y rows in Only for modtoken column).
Table rows ordering must be kept to concatenate the values and then proceed with the RSA algorithm.