Index: grails-app/controllers/com/lemans/payment/ApiPaymentProfileController.groovy =================================================================== diff -u -r3f4e67d3d5ca1bf0ef30d4e324b206dcf6afae14 -rdc8aad6e6e6cdbe475d11f47675314ff64c74951 --- grails-app/controllers/com/lemans/payment/ApiPaymentProfileController.groovy (.../ApiPaymentProfileController.groovy) (revision 3f4e67d3d5ca1bf0ef30d4e324b206dcf6afae14) +++ grails-app/controllers/com/lemans/payment/ApiPaymentProfileController.groovy (.../ApiPaymentProfileController.groovy) (revision dc8aad6e6e6cdbe475d11f47675314ff64c74951) @@ -169,6 +169,74 @@ } /** + * @descshort Send failed profiles to D365. + * @headers pfLoggedInDealerCode (Platform Only), pfLoggedInUserName (Platform Only) + * @note + * Platform to send pfLoggedInDealerCode and pfLoggedInUserName for audit purposes and to check the rights of the loggedInDealer + * @sampleout for URL : ../mediator-service/api/v1/dm/16/dealer/DUT007/payment/profile/$customerId + * {code} + * { + * "results": [ + * { + * "paymentProfileId": 76, + * "customerId": "DUT007_AELA", + * "billingId": "50FLDY", + * "dealerCode": "DUT007", + * "dealerName": "DUTCHESS REC VEHICLE INC", + * "userName": null, + * "profileTypeId": 10002, + * "profileTypeCode": "S", + * "profileTypeDescr": "Shared", + * "customerName": "RAYUDU", + * "creditCardTypeId": 37002, + * "creditCardTypeCode": "MC", + * "creditCardTypeDisplay": "Mastercard", + * "creditCardLastFour": "1111", + * "expirationMonth": "04", + * "expirationYear": "2019", + * "creditCardExpired": 2, + * "profileStatus": "EXPIRED", + * "billingName": "Rayudu", + * "billingAddress1": "123 Test St.", + * "billingAddress2": null, + * "billingCity": "Somewhere", + * "billingState": "CA", + * "billingPostalCode": "90001", + * "billingCountry": "US", + * "emailAddress": "test@test.com", + * "phoneNumber": "1234567891", + * "lemansRestricted": false, + * "mainframeCreateDate": "2019-12-13T13:03:42", + * "dateInactivated": null, + * "inactivatedBy": null, + * "dateCreated": "2019-12-13T13:03:42", + * "createdBy": "INSIDE\\HELPDESK", + * "lastUpdated": "2019-12-13T13:03:42", + * "lastUpdatedBy": "INSIDE\\HELPDESK", + * "version": 0 + * } + * ], + * meta": { + * "totalRecords": 8 + * } + * } + * {code} + * @permission IS_AUTHENTICATED_REMEMBERED + * @service Payment-Service + * @group Profiles + * @http POST + */ + @TargetEndPointMapping(value='/payment/profile/$customerId', method= RequestMethod.POST) + @Secured(closure = { + ctx.securityService.loggedInWithDomainAndHasAnyPermissions(16, ['permission_16_accounts.profiles.view', 'permission_16_accounts.profiles.edit']) + }) + def postFailedProfileToD365() { + renderPayment("/dm/$params.dm/dealer/$params.dealerCode/payment/profile/$params.customerId") + } + + + + /** * @descshort Find profiles by dealerCode. * @reqparams profileTypeId * @optparams userName Index: grails-app/controllers/com/lemans/payment/ApiV1PaymentProfileController.groovy =================================================================== diff -u -r54a36db7b49411724ab12533916d1916fec38bfe -rdc8aad6e6e6cdbe475d11f47675314ff64c74951 --- grails-app/controllers/com/lemans/payment/ApiV1PaymentProfileController.groovy (.../ApiV1PaymentProfileController.groovy) (revision 54a36db7b49411724ab12533916d1916fec38bfe) +++ grails-app/controllers/com/lemans/payment/ApiV1PaymentProfileController.groovy (.../ApiV1PaymentProfileController.groovy) (revision dc8aad6e6e6cdbe475d11f47675314ff64c74951) @@ -362,87 +362,6 @@ } /** - * @descshort Post the failed profile to D365 - * @headers pfLoggedInDealerCode (Platform Only), pfLoggedInUserName (Platform Only) - * @note - * Platform to send pfLoggedInDealerCode and pfLoggedInUserName for audit purposes and to check the rights of the loggedInDealer - * @samplein for URL : ../mediator-service/api/v2/dm/16/dealer/DUT007/paymentProfile/ - * {code} - * { - * "token": "ZWUwYjVlY2I0MGY0MjRlYzZiOGE5YmQ2MGFlYmNkNDA=", - * "hpfToken": "hpfToken", - * "encKey": "encKey", - * "billingName": "Rayudu", - * "billingAddress1": "123 Test St.", - * "billingAddress2": null, - * "billingCity": "Somewhere", - * "billingState": "CA", - * "billingPostalCode": "90001", - * "billingCountry": "US", - * "dealerCode": "DUT007", - * "phoneNumber": "", - * "emailAddress": "", - * } - * {code} - * @sampleout - * {code} - * { - * "results": { - * "paymentProfileId": 98, - * "customerId": "DUT007_VRAMISETTI_GICW", - * "billingId": "50FV91", - * "dealerCode": "DUT007", - * "dealerName": "DUTCHESS REC VEHICLE INC", - * "userName": "VRAMISETTI", - * "profileTypeId": 10001, - * "profileTypeCode": "P", - * "profileTypeDescr": "Personal", - * "customerName": "RAYUDU", - * "creditCardTypeId": 37001, - * "creditCardTypeCode": "VS", - * "creditCardTypeDisplay": "Visa", - * "creditCardLastFour": "1111", - * "expirationMonth": "04", - * "expirationYear": "2019", - * "creditCardExpired": 2, - * "profileStatus": "EXPIRED", - * "billingName": "Rayudu", - * "billingAddress1": "123 Test St.", - * "billingAddress2": null, - * "billingCity": "Somewhere", - * "billingState": "CA", - * "billingPostalCode": "90001", - * "billingCountry": "US", - * "emailAddress": null, - * "phoneNumber": null, - * "lemansRestricted": false, - * "mainframeCreateDate": "2019-12-16T09:09:49", - * "dateInactivated": null, - * "inactivatedBy": null, - * "dateCreated": "2019-12-16T09:09:49", - * "createdBy": "INSIDE\\HELPDESK", - * "lastUpdated": "2019-12-16T09:09:49", - * "lastUpdatedBy": "INSIDE\\HELPDESK", - * "version": 0 - * } - * } - * {code} - * @permission permission_16_accounts.profiles.view, permission_16_accounts.profiles.edit - * @service Payment-Service-V1 - * @group Profiles - * @http POST - */ - @TargetEndPointMapping(value='/$customerId', method= RequestMethod.POST) - @Secured(closure = { - ctx.securityService.loggedInWithDomainAndHasAnyPermissions(16, ['permission_16_accounts.profiles.edit']) - }) - def postFailedProfileToD365() { - renderPaymentV2("/dm/$params.dm/dealer/$params.dealerCode/payment/profile/$params.customerId") - } - - - - /** * @descshort Update profile of a Dealer by customerId. * @headers pfLoggedInDealerCode (Platform Only), pfLoggedInUserName (Platform Only) * @note