Skip to main content
Answer

Problem creating Payment Plugin for credit card processing - Implementation of ExportSettings()

  • September 16, 2024
  • 3 replies
  • 98 views

Forum|alt.badge.img

I’m implementing  PX.CCProcessingBase.Interfaces.V2.ICCProcessingPlugin
As per the documentation and description here

https://help.acumatica.com/Wiki/(W(4))/ShowWiki.aspx?pageid=927a2a44-ebe5-4c98-a277-7027f4e073a0
and the definition here

https://help.acumatica.com/(W(8))/Help?ScreenId=ShowWiki&pageid=8e6c3962-2ae0-63b9-ab25-2e32abeb701f

 

When I try to implement the function

IEnumerable<SettingsDetail> ExportSettings()I’m getting the below error, although I implemented it to return IEnumerable<SettingsDetail>



error CS0738: 'CyberSourcePaymentPlugin' does not implement interface member 'ICCProcessingPlugin.ExportSettings()'. 'CyberSourcePaymentPlugin.ExportSettings()' cannot implement 'ICCProcessingPlugin.ExportSettings()' because it does not have the matching return type of 'IEnumerable<SettingsDetail>'.

Not sure why I’m getting this error, here is my implmentation
public IEnumerable<SettingsDetail> ExportSettings()
{

// Create a list of SettingsDetail objects
List<SettingsDetail> settings = new List<SettingsDetail>
{
new SettingsDetail
{
SettingName = "MerchantId",
SettingValue = "yourMerchantId" // Replace with actual value
},
new SettingsDetail
{
SettingName = "ApiKey",
SettingValue = "yourApiKey" // Replace with actual value
},
new SettingsDetail
{
SettingName = "ApiSecret",
SettingValue = "yourApiSecret" // Replace with actual value
},
new SettingsDetail
{
SettingName = "Endpoint",
SettingValue = "https://api.cybersource.com" // Replace with actual endpoint
}
};

return settings;
}
And the settings details class definition is
    public class SettingsDetail
{
public string SettingName { get; set; }
public string SettingValue { get; set; }
}
hope anyone can advise, thanks

Best answer by safetynetweb

I found the issue, the SettingDetail object was not matching, should be in this format:

 new SettingsDetail
{
DetailID = "ApiSecret",
Descr = "ApiSecret",
DefaultValue = "",
IsEncryptionRequired = true
}

 

3 replies

Forum|alt.badge.img
  • Author
  • Varsity III
  • September 17, 2024

Version Acumatica 2024R1


Forum|alt.badge.img
  • Author
  • Varsity III
  • Answer
  • September 19, 2024

I found the issue, the SettingDetail object was not matching, should be in this format:

 new SettingsDetail
{
DetailID = "ApiSecret",
Descr = "ApiSecret",
DefaultValue = "",
IsEncryptionRequired = true
}

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • September 19, 2024

Thank you for sharing your solution with the community @safetynetweb!