Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
4.52 - commit 2
Browse files Browse the repository at this point in the history
  • Loading branch information
PaylineGitHub committed Oct 25, 2017
1 parent 697361d commit b0005ac
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 27 deletions.
24 changes: 15 additions & 9 deletions src/main/java/com/payline/ws/wrapper/DirectPayment.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public DirectPayment(ConnectParams connectParams) {
* @param privateDataList A list of privateData, allowing to send any kind of extra information organized with keys and values
* @param authentication3DSecure the authentication3DSecure object, filled with MD and PARES retrieved from the ACS after the customer entered his password
* @param bank the bankAccountData object, used for ELV payment only
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return DoAuthorizationResponse the response given by Payline to a debit authorization request
*/
public final DoAuthorizationResponse doAuthorization(final Payment payment, final Order order, final Buyer buyer, final Card card,
Expand Down Expand Up @@ -170,7 +170,7 @@ public final DoAuthorizationResponse doAuthorization(final Payment payment, fina
* @param privateDataList A list of privateData, allowing to send any kind of extra information organized with keys and values
* @param authentication3DSecure the authentication3DSecure object, filled with MD and PARES retrieved from the ACS after the customer entered his password
* @param authorization the authorization
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return DoDebitResponse the response given by Payline to a debit request
*/
public final DoDebitResponse doDebit(final Payment payment, final Order order, final Buyer buyer, final Card card, final PrivateDataList privateDataList,
Expand Down Expand Up @@ -214,7 +214,7 @@ public final DoDebitResponse doDebit(final Payment payment, final Order order, f
* @param transationID the unique Payline transaction ID
* @param orderID the unique Payline order id
* @param comment the comment
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return DoBankTransferResponse
*/
public final DoBankTransferResponse doBankTransfer(final Payment payment, final Creditor creditor, final String transationID, final String orderID,
Expand Down Expand Up @@ -295,10 +295,11 @@ public final DoCaptureResponse doCapture(final Payment payment, final String tra
* @param comment the comment
* @param privateDataList A list of privateData, allowing to send any kind of extra information organized with keys and values
* @param sequenceNumber the transaction sequence number
* @param order the order info. Only details (cart content) is used for doRefund
* @return DoRefundResponse the response given by Payline to a refund request
*/
public final DoRefundResponse doRefund(final Payment payment, final String transationID, final String comment, final PrivateDataList privateDataList,
final String sequenceNumber, final String version) {
final String sequenceNumber, final String version, final Order order) {
setException(null);
DoRefundResponse result = new DoRefundResponse();
DoRefundRequest parameters = new DoRefundRequest();
Expand All @@ -308,6 +309,7 @@ public final DoRefundResponse doRefund(final Payment payment, final String trans
parameters.setSequenceNumber(sequenceNumber);
parameters.setPrivateDataList(privateDataList);
parameters.setVersion(version);
parameters.setDetails(order.getDetails());
DirectPaymentAPI port = null;
try {
if (this.initFromFile) {
Expand Down Expand Up @@ -338,7 +340,7 @@ public final DoRefundResponse doRefund(final Payment payment, final String trans
* @param buyer the buyer object, containing many information about the buyer: firstname, lastname, email, addresses,...
* @param order the order object containing the ref, the amount, the currency, the date and cart content in details child
* @param privateDataList A list of privateData, allowing to send any kind of extra information organized with keys and values
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return DoCreditResponse
*/
public final DoCreditResponse doCredit(final Payment payment, final Card card, final String comment, final Buyer buyer, final Order order,
Expand Down Expand Up @@ -379,12 +381,12 @@ public final DoCreditResponse doCredit(final Payment payment, final Card card, f
* @param payment the payment object containing the amount, the currency, action and mode codes
* @param orderRef the order reference
* @param UsrAgent the user Agent
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return VerifyEnrollmentResponse
*/
public final VerifyEnrollmentResponse verifyEnrollment(final Card card, final Payment payment, final String orderRef, final String UsrAgent,
final String version) {
return this.verifyEnrollment(card, payment, orderRef, null, null, UsrAgent, version);
return this.verifyEnrollment(card, payment, orderRef, null, null, UsrAgent, version, null);
}

/**
Expand All @@ -395,10 +397,12 @@ public final VerifyEnrollmentResponse verifyEnrollment(final Card card, final Pa
* @param walletId the wallet identifier
* @param walletCardInd the card index to use
* @param UsrAgent the user Agent
* @param version the API version of Payline
* @param merchantName name displayed to buyer on 3D Secure authentication form
* @return VerifyEnrollmentResponse
*/
public final VerifyEnrollmentResponse verifyEnrollment(final Card card, final Payment payment, final String orderRef, final String walletId,
final String walletCardInd, final String UsrAgent, final String version) {
final String walletCardInd, final String UsrAgent, final String version, final String merchantName) {
setException(null);
VerifyEnrollmentResponse result = new VerifyEnrollmentResponse();
VerifyEnrollmentRequest parameters = new VerifyEnrollmentRequest();
Expand All @@ -409,6 +413,8 @@ public final VerifyEnrollmentResponse verifyEnrollment(final Card card, final Pa
parameters.setOrderRef(orderRef);
parameters.setUserAgent(UsrAgent);
parameters.setVersion(version);
parameters.setMerchantName(merchantName);

DirectPaymentAPI port = null;
try {
if (this.initFromFile) {
Expand Down Expand Up @@ -591,7 +597,7 @@ public final GetTokenResponse getToken(final String cardNumber, final String exp
/**
* @param transactionID the unique Payline transaction ID
* @param transactionDate the transaction date
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return UnBlockResponse
*/
public final UnBlockResponse unBlock(final String transactionID, final String transactionDate, final String version) {
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/payline/ws/wrapper/ExtendedAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public final GetAlertDetailsResponse getAlertDetails(final String alertId, final
logger.log(Level.SEVERE, "Error during getAlertDetails call : ", ex);
Result err = new Result();
err.setCode(Utils.EXCEPTION_CODE);
err.setLongMessage(ex.getMessage());
err.setShortMessage(ex.getMessage());
err.setLongMessage(this.factory.createResultLongMessage(ex.getMessage()));
err.setShortMessage(this.factory.createResultShortMessage(Utils.EXCEPTION_SHORTMESSAGE));
result.setResult(err);
}
return result;
Expand All @@ -119,7 +119,7 @@ public final GetAlertDetailsResponse getAlertDetails(final String alertId, final
* @param startDate the Start date of the transaction search period
* @param endDate the End date of the transaction search period
* @param transactionHistory the status history for a given transaction
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return GetTransactionDetailsResponse
*/
public final GetTransactionDetailsResponse getTransactionDetails(final String orderRef, final String transactionID, final String startDate,
Expand All @@ -146,8 +146,8 @@ public final GetTransactionDetailsResponse getTransactionDetails(final String or
logger.log(Level.SEVERE, "Error during getTransactionDetails call : ", ex);
Result err = new Result();
err.setCode(Utils.EXCEPTION_CODE);
err.setLongMessage(ex.getMessage());
err.setShortMessage(ex.getMessage());
err.setLongMessage(this.factory.createResultLongMessage(ex.getMessage()));
err.setShortMessage(this.factory.createResultShortMessage(Utils.EXCEPTION_SHORTMESSAGE));
result.setResult(err);
}
return result;
Expand Down Expand Up @@ -214,8 +214,8 @@ public final TransactionsSearchResponse transactionsSearch(final String orderRef
logger.log(Level.SEVERE, "Error during transactionsSearch call : ", ex);
Result err = new Result();
err.setCode(Utils.EXCEPTION_CODE);
err.setLongMessage(ex.getMessage());
err.setShortMessage(ex.getMessage());
err.setLongMessage(this.factory.createResultLongMessage(ex.getMessage()));
err.setShortMessage(this.factory.createResultShortMessage(Utils.EXCEPTION_SHORTMESSAGE));
result.setResult(err);
}
return result;
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/com/payline/ws/wrapper/WalletPayment.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public WalletPayment(ConnectParams connectParams) {
* @param contractNumber Payline identifier of your e-commerce contract number
* @param privateDataList A list of privateData, allowing to send any kind of extra information organized with keys and values
* @param authentication3DSecure the authentication3DSecure object, filled with MD and PARES retrieved from the ACS after the customer entered his password
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return CreateWalletResponse
*/
public final CreateWalletResponse createWallet(final Wallet wallet, final String contractNumber, final PrivateDataList privateDataList,
Expand Down Expand Up @@ -169,7 +169,7 @@ public final CreateWalletResponse createWallet(final Wallet wallet, final String
* @param walletId the wallet identifier
* @param contractNumber Payline identifier of your e-commerce contract number
* @param Cardind within a wallet, index of the card to be used for payment
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return GetWalletResponse
*/
public final GetWalletResponse getWallet(final String walletId, final String contractNumber, final String Cardind, final String version) {
Expand Down Expand Up @@ -207,7 +207,7 @@ public final GetWalletResponse getWallet(final String walletId, final String con
* @param privateDataList A list of privateData, allowing to send any kind of extra information organized with keys and values
* @param authentication3DSecure the authentication3DSecure object, filled with MD and PARES retrieved from the ACS after the customer entered his password
* @param Cardind within a wallet, index of the card to be used for payment
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return UpdateWalletResponse
*/
public final UpdateWalletResponse updateWallet(final Wallet wallet, final String contractNumber, final PrivateDataList privateDataList,
Expand Down Expand Up @@ -319,7 +319,7 @@ public final EnableWalletResponse enableWallet(final String walletId, final Stri
* @param walletId the wallet identifier
* @param Cardind within a wallet, index of the card to be used for payment
* @param cvx Card Verification Value associated to the Card Number
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return DoImmediateWalletPaymentResponse
*/
public final DoImmediateWalletPaymentResponse doImmediateWalletPayment(final Payment payment, final Order order, final Buyer buyer,
Expand Down Expand Up @@ -506,7 +506,7 @@ public final GetPaymentRecordResponse getPaymentRecord(final String contractNumb

/**
* This web service modifies one or several settings for a payment record.
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @param contractNumber Payline identifier of your e-commerce contract number
* @param paymentRecordId identifier of a payment record (a list of billing record)
* @param recurring the recurring object, containing data about how Payline will deal with the recurring payment : first amount, other amount, number of
Expand Down Expand Up @@ -778,7 +778,7 @@ public final UpdateWebWalletResponse updateWebWallet(final String walletId, fina

/**
* Manage a wallet from the web interface.
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @param contractNumber Payline identifier of your e-commerce contract number
* @param selectedContractList a list of selectedContract objects, containing Payline identifier of your e-commerce contract number
* @param updatePersonalDetails flag (0/1) to indicate whether customer can change his personal details (firstname, lastname,...) on update wallet page
Expand All @@ -793,12 +793,13 @@ public final UpdateWebWalletResponse updateWebWallet(final String walletId, fina
* @param privateDataList A list of privateData, allowing to send any kind of extra information organized with keys and values
* @param customPaymentTemplateURL URL of the custom template
* @param contractNumberWalletList a list of selectedContract objects, containing Payline identifier of your e-commerce contract number
* @param merchantName name displayed to buyer on 3D Secure authentication form
* @return ManageWebWalletResponse
*/
public final ManageWebWalletResponse manageWebWallet(final String version, final String contractNumber, final SelectedContractList selectedContractList,
final String updatePersonalDetails, final Buyer buyer, final Owner owner, final String languageCode, final String customPaymentPageCode,
final String securityMode, final String returnURL, final String cancelURL, final String notificationURL, final PrivateDataList privateDataList,
final String customPaymentTemplateURL, final ContractNumberWalletList contractNumberWalletList) {
final String customPaymentTemplateURL, final ContractNumberWalletList contractNumberWalletList, final String merchantName) {
setException(null);
WebPaymentAPI port = null;
ManageWebWalletResponse result = new ManageWebWalletResponse();
Expand All @@ -818,6 +819,7 @@ public final ManageWebWalletResponse manageWebWallet(final String version, final
parameters.setPrivateDataList(privateDataList);
parameters.setCustomPaymentTemplateURL(customPaymentTemplateURL);
parameters.setContractNumberWalletList(contractNumberWalletList);
parameters.setMerchantName(merchantName);
try {
if (this.initFromFile) {
port = Utils.initServiceWeb();
Expand All @@ -840,7 +842,7 @@ public final ManageWebWalletResponse manageWebWallet(final String version, final
/**
* This method is used to retrieve information from a virtual wallet created via the web interface
* @param token identifier of a web payment, create/update wallet session
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @return GetWebWalletResponse
*/
public final GetWebWalletResponse getWebWallet(final String token, final String version) {
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/payline/ws/wrapper/WebPayment.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public WebPayment(ConnectParams connectParams) {
/**
* Get web payment results
* @param token identifier of a web payment, create/update wallet session
* @param version, the API version of Payline : 13 corresponds to 4.45 release
* @param version, the API version of Payline
* @return GetWebPaymentDetailsResponse the response from Payline to a request for the results of a web payment.
*/
public final GetWebPaymentDetailsResponse getWebPaymentDetails(final String token, final String version) {
Expand Down Expand Up @@ -118,7 +118,7 @@ public final GetWebPaymentDetailsResponse getWebPaymentDetails(final String toke
/**
* Initialisation of a web payment The <b>doWebPayment</b> function initialises a web payment before redirecting your customer to Payline payment pages.
* This allows immediate or deferred cash payments, X-time payments, and subscription payments to be made
* @param version the API version of Payline : 13 corresponds to 4.45 release
* @param version the API version of Payline
* @param payment the payment object containing the amount, the currency, action and mode codes
* @param order the order object containing the ref, the amount, the currency, the date and cart content in details child
* @param buyer the buyer object, containing many information about the buyer: firstname, lastname, email, addresses,...
Expand All @@ -134,12 +134,13 @@ public final GetWebPaymentDetailsResponse getWebPaymentDetails(final String toke
* @param selectedContractList a list of selectedContract objects, containing Payline identifier of your e-commerce contract number
* @param secondSelectedContractList the list of contract numbers you wish to present again after a first payment attempt has failed.
* @param customPaymentTemplateURL URL of the custom template
* @param merchantName name displayed to buyer on 3D Secure authentication form
* @return DoWebPaymentResponse the response given by Payline to a web payment initialisation request
*/
public final DoWebPaymentResponse doWebPayment(final String version, final Payment payment, final Order order, final Buyer buyer,
final PrivateDataList privateDataList, final Recurring recurring, String notificationURL, String returnURL, String cancelURL, String languageCode,
String securityMode, final String customPaymentPageCode, SelectedContractList selectedContractList, SelectedContractList secondSelectedContractList,
final String customPaymentTemplateURL) {
final String customPaymentTemplateURL, final String merchantName) {
setException(null);
DoWebPaymentResponse result = new DoWebPaymentResponse();
DoWebPaymentRequest parameters = new DoWebPaymentRequest();
Expand Down Expand Up @@ -198,6 +199,7 @@ public final DoWebPaymentResponse doWebPayment(final String version, final Payme

parameters.setSelectedContractList(selectedContractList);
parameters.setSecondSelectedContractList(secondSelectedContractList);
parameters.setMerchantName(merchantName);
WebPaymentAPI port = null;
try {
if (this.initFromFile) {
Expand Down

0 comments on commit b0005ac

Please sign in to comment.