You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.6 KiB

1 year ago
  1. USE [FastMoneyPro_Remit]
  2. GO
  3. ALTER PROCEDURE DLL_PROC_GET_PARTNER_CONFIG(
  4. @Flag VARCHAR(100)
  5. ,@payOutPartnerId BIGINT
  6. ,@pCountryId BIGINT
  7. ,@pCountryName VARCHAR(50) = NULL
  8. ,@deliveryMethodId BIGINT
  9. )
  10. AS
  11. SET NOCOUNT ON
  12. BEGIN
  13. IF @Flag='config'
  14. BEGIN
  15. IF @pCountryId IS NULL AND @pCountryName IS NOT NULL
  16. SELECT @pCountryId = countryId FROM countryMaster(NOLOCK) WHERE countryName = @pCountryName
  17. IF @PAYOUTPARTNERID = 601391 ---- CEBUEANA LHUILLIER
  18. BEGIN
  19. SELECT TOP 1
  20. BaseUrl = 'http://cebuana.gmeremit.com.kr:7005/Cebuana'
  21. ,[Authorization] = '29F9D158-9F59-4D3E-972F-2B4E29D996F2'
  22. ,[PartnerRate] = 0
  23. ,[PartnerPin] = 0
  24. ,DefaultAgent = ''
  25. RETURN
  26. END
  27. IF EXISTS(SELECT 'x' FROM dbo.TblPartnerwiseCountry(NOLOCK) WHERE IsActive = 1 AND AgentId=@payOutPartnerId AND CountryId=@pCountryId AND PaymentMethod = @deliveryMethodId)
  28. BEGIN
  29. SELECT TOP 1
  30. [BaseUrl]
  31. ,[PartnerRate] = CASE WHEN GetRateFrom='LOG' THEN 1 ELSE [PartnerRate] END
  32. ,[PartnerPin] = [PartnerPin]
  33. ,[Authorization] = AuthKey
  34. ,DefaultAgent
  35. FROM dbo.TblPartnerwiseCountry(NOLOCK)
  36. WHERE AgentId=@payOutPartnerId AND CountryId=@pCountryId AND PaymentMethod=@deliveryMethodId
  37. AND IsActive=1
  38. END
  39. ELSE
  40. BEGIN
  41. SELECT TOP 1
  42. [BaseUrl]
  43. ,[PartnerRate] = CASE WHEN GetRateFrom='LOG' THEN 1 ELSE [PartnerRate] END
  44. ,[PartnerPin] = [PartnerPin]
  45. ,[Authorization] = AuthKey
  46. ,DefaultAgent
  47. FROM dbo.TblPartnerwiseCountry(NOLOCK)
  48. WHERE IsActive=1 AND AgentId=@payOutPartnerId AND CountryId=@pCountryId --AND PaymentMethod=@deliveryMethodId
  49. END
  50. END
  51. END