Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
com.worldline.sips:payment-sdk-common
Advanced tools
This library simplifies the use of SIPS 2.0, the Worldline e-payments API
This package provides a JAVA implementation for SIPS, a Worldline e-payments gateway.
:warning: This library was written for SIPS 2.0 and is not compatible with SIPS 1.0
This package contains a basic connector for SIPS, based on the SIPS Paypage JSON API. Please refer to the documentation for a better understanding.
If you find field or functionality is missing, feel free to submit a PR or create an issue.
dependencies {
implementation 'com.worldline.sips:payment-sdk:1.4.3'
}
<dependency>
<groupId>com.worldline.sips</groupId>
<artifactId>payment-sdk</artifactId>
<version>1.4.3</version>
</dependency>
:bulb: Currently this library only supports SIPS in pay page mode.
First, create a client for the desired environment using your merchant ID, key version & secret key:
PaypageClient paypageClient = new PaypageClient(
Environment.TEST,
"002001000000002",
1, // This shouldn't be hardcoded here...
"002001000000002_KEY1"); // ...and neither should this.
:bulb: Merchant data for SIPS TEST can be found in the documentation.
Then set up a request to initialize a session on the SIPS server:
PaymentRequest paymentRequest = new PaymentRequest();
paymentRequest.setAmount(2);
paymentRequest.setCurrencyCode(Currency.EUR);
paymentRequest.setOrderChannel(OrderChannel.INTERNET);
Add unique reference for the transaction:
paymentRequest.setTransactionReference("My awesome transaction reference");
And initialize your session on the server:
InitalizationResponse initializationResponse = paypageClient.initialize(paymentRequest);
The initializationResponse
you'll receive from the server contains all information needed to continue
handling your transaction. If your initialization was successful, your response will contain a
RedirectionStatusCode.TRANSACTION_INITIALIZED
.
In case your initialization was successful, you have to use the redirectionUrl
received to perform a POST request
with both the redirectionData
and seal
as parameters. Since this should redirect the customer the SIPS
payment page, the cleanest example is a simple HTML form:
<form method="post" action="redirectionUrl">
<input name="redirectionData" type="hidden" value="..." />
<input name="seal" type="hidden" value="..." />
<input type="submit" value="Proceed to checkout"/>
</form>
When your customer is done, he will be able to return to your application. This is done
via a form, making a POST request to the normalReturnUrl
provided during the initialization of your payment.
This POST request contains details on the payment. You can simply decode these responses, providing a Map<String, String>
of the parameters included in the received request to your PaypageClient
:
PaypageResponse paypageResponse = paypageClient.decodeResponse(mappedRequestParameters);
:warning: Since the customer is not always redirecting back (e.g. he closes the confirmation page), it's a good practice to include an
automaticResponseUrl
. SIPS will always POST details on the transaction on this URL, even if a customer doesn't redirect back to your application.
FAQs
Unknown package
We found that com.worldline.sips:payment-sdk-common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.