If integration for the Create transaction API and Web Checkout SDK is done well, you are ready to test the Web Checkout service and go to the next step. For the next step and integration testing, you can refer to below screen shot.
At step #6, you need to retrieve ref_id from the query parameter and call the Get payment credentials API for getting payment credential data. After getting it, you can process your own payment flow. Finally, if you get the payment result from the Acquirer, deliver it by calling the Notify payment result API.
.
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*;
import org.springframework.web.bind.*;
import org.springframework.web.client.*;
@RestController
public class HealthCheckController {
@Value("${ops.address}")
private String onlinePaymentsAddress;
@RequestMapping(method = RequestMethod.HEAD, value = "/samsungpay/integration/health")
public ResponseEntity<Void> health() {
String healthcheckAddress = onlinePaymentsAddress + "/ops/v1/internal/health";
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<Void> healthcheckResponse;
try {
healthcheckResponse = restTemplate.exchange(healthcheckAddress, HttpMethod.HEAD,
null, Void.class);
} catch (RestClientException e) {
return new ResponseEntity<>(HttpStatus.BAD_GATEWAY);
}
if (healthcheckResponse.getStatusCode() != HttpStatus.NO_CONTENT) {
return new ResponseEntity<>(HttpStatus.BAD_GATEWAY);
}
return healthcheckResponse;
}
}
Manage Your Cookies
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.