Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Unanswered

Commerce payment packaging for Finance and Operations deployment and the Build automation that uses Microsoft-hosted agents

Posted on by 1,433

Our tier-2 and production environments were switched to self-service environments.

When they were still Microsoft-managed, I used to merge the retail deployable package with the AX deployable package and upgrade them with the merged package. This was needed because the ISV software we use for payments, have a commerce component that needed to be copied into the AOS directories for it to work. The merged package took care of that.

With the switch to the self-service environment, I lost the ability to create merge packages. The environments now refuse to recognize the merge package. So now I have to create the commerce payment package for D365F&O.

I also don't make use of a build server, I now use the build automation using a Microsoft-hosted agent: (Build automation that uses Microsoft-hosted agents and Azure Pipelines - Finance & Operations | Dynamics 365 | Microsoft Docs)

Now if I look at Create Commerce payment packaging for Finance and Operations deployment - Commerce | Dynamics 365 | Microsoft Docs, it only explains how to create the package with Visual Studio.

According to this link also I only copy DLLs and HTML files into the new model for the payment package. It also doesn't mention if I need to add this new model as a reference to my custom model. It just states in step 4: Select the required referenced package, and then select Next.. So what is the 'required referenced package' ?

Can I add it to the build pipeline so that it can be added automatically to the AX deployable package?

If so, because it has mostly DLLs with HTML files in the Resource directory, do I just add it to the step: Copy BinaryDependencies to $(BuildBinariesDirectory) in the pipeline or do I have to add it to the Visual Studio project that contains the 3rd party models that contains their source code and which then will be included in the step : build solution step in the pipeline setup?

Any help with this is much appreciated.

  • ToddB Profile Picture
    ToddB on at
    RE: Commerce payment packaging for Finance and Operations deployment and the Build automation that uses Microsoft-hosted agents

    Hi Retha,

    Thank you for sharing the solution.

  • Retha Profile Picture
    Retha 1,433 on at
    RE: Commerce payment packaging for Finance and Operations deployment and the Build automation that uses Microsoft-hosted agents

    Note that tis new way of adding a payment connector package is ONLY for those who have their tier-2 and production environments changed to be self-service.

    For the rest, the merged package where you merge the retail deployable package and the AX deployable package, will still work.

    I was correct in that this needed to be treated like a source code model. With the help of Microsoft I got this working.

    So first you MAKE SURE that the new model starts with RetailPaymentConnectors.

    You add no references to any other models to this model if it isn't needed. In my case it was not needed.

    Then you follow steps 6, 7 and 8 in docs.microsoft.com/.../payment-connector-package.

    Note that for step 8, the part where it mentions the URL needs to be updated, is a later stage, nothing to do with the project that you are adding the references and resources to.

    To add a resource, you right-click on the project, select Add item and select Resources from the list. Then you go to the directory where the HTML, CSS and Images are and add them as a resource.

    Then you build the solution.

    This will create a Bin directory with DLLs in them due to the references added.

    Add to source control, the Bin directory with the DLLs, the Descriptor file and the model itself.

    Check it all in.

    Now go back to step 8 and log into D365F&O.

    Go to the Accounts Receivable > Payments Setup > Payment Services and update the field "Payment accept web url" to the new format as given in step 8:

    AOSUrl/.../Myhtml.html

    On your Dev box, because you will not install the deployable package onto the box (you are creating it on the box), make sure the HTML files are in AOSService\Webroot\Resources\Html and the images are in AOSService\Webroot\Resources\Images. And if you have CSS files added as a resource, it needs to be in AOSService\Webrooot\Resources\styles.

    Your DLLs will be already in the new model's bin directory.

    Now for those that do not have a build server but who are using Build automation that uses Microsoft-hosted agents, follow these steps.

    1) Open your solution where you have added all the models for which you have the source code, in Visual Studio. Thus all the models that you have a Descriptor file for will be in this solution. This should thus include the new payment connector model as well because it has a Descriptor file.

    If all your other ISV code are deployable packages and only this connector package have source code, then of cause you have to first add the solution.

    a) Open Visual Studio, go to File > New > Project.  

    b) On the left in the tree open ‘Other Project Types’, then click on Visual studio Solutions and choose Blank solution.

    c) Add the solution to source control.

    2) Right-click on the solution and choose Add New Project.

    Give the project the exact name as the model you added for the payment connector.

    Then right-click on the project, go to its properties and change the model to the payment connector model.

    Make sure your project build order is still correct.

    Make sure the project is also added to source control.

    3) Save your solution and check it back into source control.

    If this is the only source code model and thus was the first time you added a solution, then you have to add the solution to the pipeline as well.

    1. Go to the Build Solutions task on the pipeline and click on it. On the right, for its Solution, click on the 3-dots and choose the solution you added in (1) above that contains the projects for each model package that must be build. Choose the actual solution, not the folder with the same name.

    The build agent will then add this all the models in the solution to the AX deployable package, because you have the solution set up in the 'Build solution'-task of your pipeline.

  • Retha Profile Picture
    Retha 1,433 on at
    RE: Commerce payment packaging for Finance and Operations deployment and the Build automation that uses Microsoft-hosted agents

    Hi Juliet, I can't get anybody to answer the following for me. I asked our Microsoft partner, even logged a ticket with Microsoft on this same topic, but no answer as of yet from anybody:

    /*

    If so, because it has mostly DLLs with HTML files in the Resource directory, do I just add it to the step: Copy BinaryDependencies to $(BuildBinariesDirectory) in the pipeline or do I have to add it to the Visual Studio project that contains the 3rd party models that contains their source code and which then will be included in the step : build solution step in the pipeline setup?

    */

    We have other custom as well. Our own and from 3rd party vendors. some with source code and others only as a deployable package.

    The ones with source code goes into the solution that is referenced in the pipeline under the 'Build solution' task.

    The ones with just binaries (those only giving deployable packages), goes into the 'Copy BinaryDependencies' task.

    Seeing that this new model only exist of references ( thus a list of DLLs)  and resources, does it still count as source code and must thus be added to the solution use din the 'Build solution' or must the model just be added under the 'Copy BinaryDependencies'?

    The above is very important information and it is missing from the All-in-one deployable package as well as missing from the commerce payment packaging Microsoft documentation.

    My guess is that I need to treat it as source code but would like it to be confirmed.

  • Juliet Zhu Profile Picture
    Juliet Zhu on at
    RE: Commerce payment packaging for Finance and Operations deployment and the Build automation that uses Microsoft-hosted agents

    Hello Retha,

    That is correct - you shouldn't merge Retail deployable package with AX deployable package as you will get above error now.

    To implement payment connector, you should build an All-In-One packge by following the same article which you mentioned in this thread:
    https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/payment-connector-package 

    In regards to your question about step 4:
    It will default to the Application Platform package being selected. You should be able to just click Next and leave that default since the package is just going to have references to your connector and it's dependencies.

    Please make sure on naming the model starting with RetailPaymentConnectors - we have seen some cases hit by that naming convention and something as simple as forgetting the 's' at the end of Connectors in the model name.

    Hope it helps.

    Juliet Zhu
    If my information answers your question please click 'Yes' against "Did this answer your question?" to help other community members. 

  • Retha Profile Picture
    Retha 1,433 on at
    RE: Commerce payment packaging for Finance and Operations deployment and the Build automation that uses Microsoft-hosted agents

    I just tried a merge package again where I merged my RetailDeployablePackage with the AXDeployablePackage and tried to upgrade the tier-2 environment with the merged package.

    This used to work with  Microsoft-managed environments.

    The package was listed  in LCS for my tier-2 environment Apply Updates menu option, but when I selected it from the grid and clicked on OK, I got the following error:

    Unknown error occurred during package deployment. Please try again later. If the issue persists, contact support.

    When I selected only the AXDEployablePackage, it allowed me to choose it and is applying it to the tier-2 environment.

    So the merge package option isn't an option anymore to get the payment connector installed for F&O

  • Retha Profile Picture
    Retha 1,433 on at
    RE: Commerce payment packaging for Finance and Operations deployment and the Build automation that uses Microsoft-hosted agents

    Andre I don't think this is a Commerce forum issue.

    This is an upgrade for F&O. The ISV solution just doesn't have a separate connector for D365, it needs to share the Commerce connector. So specific steps need to be taken to create an AXDeployablePackage which is F&O, not Commerce

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: Commerce payment packaging for Finance and Operations deployment and the Build automation that uses Microsoft-hosted agents

    Moved to the Dynamics 365 Commerce forum.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans