Package com.skava.paymentapp.web
Class RegisterPaymentController
java.lang.Object
com.skava.paymentapp.web.RegisterPaymentController
@RestController
@RequestMapping("/paymentapp")
public class RegisterPaymentController
extends Object
This controller using RegisterPaymentService
registerpayment - It's return register Payment response
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<RegisterPaymentResponse>registerPayment(String version, String locale, int paymentOptionId, long collectionId, @Valid RegisterPaymentDetails details) This api is used to register a payment with the provider registerpayment - It's return register Payment response register payment will return the request url.
-
Constructor Details
-
RegisterPaymentController
public RegisterPaymentController()
-
-
Method Details
-
registerPayment
@PostMapping("/registerpayment") @PreAuthorize("hasRoleForServiceAndCollection(\'ROLE_REG_USER\', \'payment\',#collectionId) || hasRoleForServiceAndCollection(\'ROLE_ACCOUNT_BUYER_ADMIN\',\'payment\', #collectionId) || hasRoleForServiceAndCollection(\'ROLE_GUEST\',\'payment\', #collectionId) || hasRoleForServiceAndCollection(\'ROLE_ACCOUNT_BUYER\',\'payment\', #collectionId) || hasPrivilegeForServiceAndCollection(\'payment/create/payment\',\'payment\', #collectionId) || hasPrivilegeForServiceAndCollection(\'payment/create/paymentitem\',\'payment\', #collectionId) || hasPrivilegeForServiceAndCollection(\'payment/create/transaction\', \'payment\',#collectionId) ") public org.springframework.http.ResponseEntity<RegisterPaymentResponse> registerPayment(@RequestHeader(value="x-version-id",required=false,defaultValue="8.17.4") String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="paymentOptionId",required=true,defaultValue="1") int paymentOptionId, @RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestBody(required=true) @Valid @Valid RegisterPaymentDetails details) This api is used to register a payment with the provider registerpayment - It's return register Payment response register payment will return the request url. Get the response url RequestUrl Success url Failure url cancel url session url- Parameters:
version- Indicates the version of the API to be used.locale- It contains value of user locale.collectionId- This field holds a valid collection identifier of this microservice and requested operation will be performed on this collection identifier.- Returns:
- A {link @ResponseEntity} object.
-