Is it possible to select all the customer's credit cards using SAGE BOI

SOLVED

We have an in-house built application. The application uses BOI to integrate with SAGE.

One of the forms inside the application needs to present the user with the list of customer's credit cards.

Is there a way to find all the customer's credit cards stored in SAGE using BOI? I would highly appreciate an example or code excerpt in any language.

Thanks a lot,

Boris

  • 0

    For PCI compliance issues all credit card details are no longer stored locally.  All the full information is stored in the Sage Vault offsite.  You could probably get general information but not full card numbers to share with your other app.

    I don't know if it's possible to query the full card info from the vault.

  • 0 in reply to TomTarget

    Thanks you a lot for prompt reply, Tom

    Yes, my question was solely about general information (last 4, address). I have no problems storing the new credit cards in SAGE vault or creating orders using credit cards stored in vault (which is what majority of people have problem with).

    Let me rephrase, how would I do in BOI something that could be done with the following query?

    SELECT * FROM AR_CustmerCreditCard WHERE ARDivisionNo = '00' AND CustomerNo = 'XXXX' 

  • 0 in reply to TomTarget

    Here is my attempt to return customer's credit cards but for some reason I'm getting only VISA cards. The problem is that after iterating through all VISA cards for customer1 nMoveNext goes to VISA cards for customer2 and breaks out of loop. I would expect the logic to iterate through all card types for customer1 prior to going to customer2.

    public void Load(string arDivisionNumber, string accountCode)
    {


    MASDispatchObject.InvokeMethod("nMoveFirst");
    MASDispatchObject.InvokeMethod("nFind", $"{arDivisionNumber}{accountCode}");
    CreditCards = new List();
    while ((int)MASDispatchObject.GetProperty("nEOF") == 0)
    {


    string masAccountCode = GetValue("CUSTOMERNO$") as string;
    if (!string.IsNullOrWhiteSpace(masAccountCode))
    {

    if (masAccountCode != accountCode) { break; }
    CreditCard creditCard = new CreditCard();
    creditCard.LastFourDigits = GetValue("LAST4UNENCRYPTEDCREDITCARDNOS$") as string;
    creditCard.CardholderName = GetValue("CARDHOLDERNAME$") as string; CreditCards.Add(creditCard);

    }

    MASDispatchObject.InvokeMethod("nMoveNext");

    }

    }

  • +1 in reply to Boris Volegov
    verified answer

    I'm not used to using the specific language you are using so I can only give you generalisms.

    In the customizer scripting (that I am more familiar with) there is a command called SETBROWSEFILTER that extracts only the items that meet the filter as you step through the file.   I believe that FIND simply steps you to the record you specify and then from there will just step sequentially through the file dependent on which index you have specified.

    If you use the SETBROWSEFILTER you should get only the items that meet the criteria specified.

    An example of this might be retval = oSalesHistory.SetBrowseFilter(dDiv & SCust & "NGk").

    Sorry I can't be more specific,  but hopefully this points you in the right direction.

  • 0 in reply to TomTarget

    Thanks a lot, Tom. This seems like a solution! I'll try this later today.