|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gsm.oneapi.payment.Charge
public class Charge
Field Summary | |
---|---|
static boolean |
dumpRequestAndResponse
|
Constructor Summary | |
---|---|
Charge(ServiceEndpoints endPoints,
java.lang.String authorisationHeader)
Creates a new instance of the Payment Charge API main interface. |
Method Summary | |
---|---|
PaymentResponse |
charge(java.lang.String endUserId,
java.lang.String referenceCode,
java.lang.String description,
java.lang.String currency,
double amount,
java.lang.String code,
java.lang.String callbackURL,
java.lang.String clientCorrelator,
java.lang.String onBehalfOf,
java.lang.String purchaseCategoryCode,
java.lang.String channel,
double taxAmount,
java.lang.String serviceId,
java.lang.String productId)
Charge an amount to the end user's bill / mobile phone account. |
static void |
main(java.lang.String[] args)
|
PaymentResponse |
refund(java.lang.String endUserId,
java.lang.String referenceCode,
java.lang.String description,
java.lang.String currency,
double amount,
java.lang.String code,
java.lang.String clientCorrelator,
java.lang.String originalServerReferenceCode,
java.lang.String onBehalfOf,
java.lang.String purchaseCategoryCode,
java.lang.String channel,
double taxAmount,
java.lang.String serviceId,
java.lang.String productId)
Refund an amount to the end user's bill / mobile phone account. |
void |
setAuthorisationHeader(java.lang.String authorisationHeader)
Can be used to update the service authorisation header |
void |
setEndpoints(ServiceEndpoints endPoints)
Can be used to update the service endpoints |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean dumpRequestAndResponse
Constructor Detail |
---|
public Charge(ServiceEndpoints endPoints, java.lang.String authorisationHeader)
endPoints
- contains a set of service/ call specific endpointsauthorisationHeader
- Base 64 encoded username/ passwordServiceEndpoints
,
JSONRequest.getAuthorisationHeader(String, String)
Method Detail |
---|
public void setEndpoints(ServiceEndpoints endPoints)
endPoints
- contains a set of service/ call specific endpointsServiceEndpoints
public void setAuthorisationHeader(java.lang.String authorisationHeader)
authorisationHeader
- Base 64 encoded username/ passwordJSONRequest.getAuthorisationHeader(String, String)
public PaymentResponse charge(java.lang.String endUserId, java.lang.String referenceCode, java.lang.String description, java.lang.String currency, double amount, java.lang.String code, java.lang.String callbackURL, java.lang.String clientCorrelator, java.lang.String onBehalfOf, java.lang.String purchaseCategoryCode, java.lang.String channel, double taxAmount, java.lang.String serviceId, java.lang.String productId)
endUserId
- (mandatory) is the end user ID; in this case their MSISDN including the 'tel:' protocol identifier and the country code preceded by '+'. i.e., tel:+16309700001. OneAPI also supports the Anonymous Customer Reference (ACR) if provided by the operator. Do not URL encode this value prior to passingreferenceCode
- (mandatory, unique per charge event) is your reference for reconciliation purposes. The operator should include it in reports so that you can match their view of what has been sold with yours by matching the referenceCodes.description
- (mandatory) is the human-readable text to appear on the bill, so the user can easily see what they bought.currency
- (mandatory) is the 3-figure code as per ISO 4217. Note either amount and currency or code must be provided.amount
- (mandatory) can be a whole number or decimal. Note either amount and currency or code must be provided.code
- (mandatory) a code provided by the OneAPI implementation that is used to reference an operator price point. Note either amount and currency or code must be provided.callbackURL
- (optional) URL to post the result of the charge operation toclientCorrelator
- (optional) uniquely identifies this create charge request. If there is a communication failure during the charge request, using the same clientCorrelator when retrying the request allows the operator to avoid applying the same charge twice.onBehalfOf
- (optional) allows aggregators/partners to specify the actual payee.purchaseCategoryCode
- (optional) specifies the type/category of purchase e.g. "Video", "Game"channel
- (optional) can be "Wap", "Web", "SMS", depending on the source of user interactiontaxAmount
- (optional) tax already charged by the merchant.serviceId
- (optional) The ID of the partner/merchant serviceproductId
- (optional) combines with the serviceID to uniquely identify the product being purchased.PaymentResponse
public PaymentResponse refund(java.lang.String endUserId, java.lang.String referenceCode, java.lang.String description, java.lang.String currency, double amount, java.lang.String code, java.lang.String clientCorrelator, java.lang.String originalServerReferenceCode, java.lang.String onBehalfOf, java.lang.String purchaseCategoryCode, java.lang.String channel, double taxAmount, java.lang.String serviceId, java.lang.String productId)
endUserId
- (mandatory) is the end user ID; in this case their MSISDN including the 'tel:' protocol identifier and the country code preceded by '+'. i.e., tel:+16309700001. OneAPI also supports the Anonymous Customer Reference (ACR) if provided by the operator. Do not URL encode this value prior to passingreferenceCode
- (mandatory, unique per charge event) is your reference for reconciliation purposes. The operator should include it in reports so that you can match their view of what has been sold with yours by matching the referenceCodes.description
- (mandatory) is the human-readable text to appear on the bill, so the user can easily see what they bought.currency
- (mandatory) is the 3-figure code as per ISO 4217. Note either amount and currency or code must be provided.amount
- (mandatory) can be a whole number or decimal. Here means the amount to refund, which can be a full or partial refund of the original charge. Note either amount and currency or code must be provided.code
- (mandatory) a code provided by the OneAPI implementation that is used to reference an operator price point. Note either amount and currency or code must be provided.clientCorrelator
- (optional) uniquely identifies the refund request. If there is a communication failure during the refund request, using the same clientCorrelator when retrying the request allows the operator to avoid applying the same refund twice.originalServerReferenceCode
- (optional) if a serverReferenceCode was provided in the response to the orignal charge request, then you must include it in your refund request. Omitting it risks a policy exception being thrown.onBehalfOf
- (optional) allows aggregators/partners to specify the actual payee.purchaseCategoryCode
- (optional) specifies the type/category of purchase e.g. "Video", "Game"channel
- (optional) can be "Wap", "Web", "SMS", depending on the source of user interactiontaxAmount
- (optional) tax already charged by the merchant.serviceId
- (optional) The ID of the partner/merchant serviceproductId
- (optional) combines with the serviceID to uniquely identify the product being purchased.PaymentResponse
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |