Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Online Store Payment Issues

Posted on by 312
I have created a new online store in AX7 and trying to create an online order however on trying credit card payment i get the following error.

Sorry, something went wrong. We were unable to obtain the card payment accept page url. Please refresh the page and try again.
The payment connector configured for my online store is the test connector (as per below snapshot)
Payment-Connector.png
. However i noticed that the Service Account Id is different from the demo data online stores. Any suggestions?


As a a work around i tried using loyalty points redemption to complete the order however that too failed with this error- The loyalty payment amount exceeds what is allowed for this loyalty card in this transaction.
Any suggestions?
Categories:
  • Erik G Profile Picture
    Erik G 20 on at
    RE: Online Store Payment Issues

    Thank you for the answer.

    im having the same issue "Sorry, something went wrong. We were unable to obtain the card payment accept page url. Please refresh the page and try again."

    Im trying to test the adyen paymentconnector with the retail store front on Microsoft Dynamics 365 for Finance and Operations (10.0.4) enviroment. I have followed docs.microsoft.com/.../adyen-connector and specified the currency USD and till get this error. Could this be caused by any thing else?

    best regards

  • Eben Abraham Profile Picture
    Eben Abraham 10 on at
    RE: Online Store Payment Issues

    Hi Sergey, Hitesh
    I am also facing a problem when i am trying to use the test payment connector, i have asked a question at https://community.dynamics.com/ax/f/33/t/272899 , could you please help me with it?

  • Verified answer
    SergeyP Profile Picture
    SergeyP 2,928 on at
    RE: Online Store Payment Issues

    Good, so, I would like to summarize to close on this topic so anyone else who would experience the issues you enumerated in this thread knows what to do:

    1. The error "Sorry, something went wrong. We were unable to obtain the card payment accept page url." was due to the absence of supported currencies for the test connector (specified on AX side). In RTW this is easier to investigate because you will find in the log (in case there is no currency for the connector) the warning:

    Connector {0} missing supported currencies property

    which will be followed by the error

    No payment connector could be found for channel id '{0}' that supports the requested currency type '{1}' and card type '{2}'.

    2. "The service call is taking longer than expected. Please wait for it to respond or refresh the page and try again." - that could be seen only on CTP8 and is not applicable to RTW. The reason why it happened is because the same instance of test payment accept page is used for CTP8 and RTW and payment code was a little bit changed in RTW that is why CTP8, when is used with that specific test payment accept page, will showcase the problem. To fix it in CTP8 the file Checkout.ts (in the eCommerce' SDK) should be modified:

    • [CTRL]+F in that file for case Checkout.CARDPAYMENTACCEPTPAGEWIDTH:
    • Replace it with case Checkout.CARDPAYMENTACCEPTPAGEHEIGHT:
    • Clear browser's cache, close all browser's instances and then navigate to your app again

    Again, this issue can now (with the availability of RTW) be seen in CTP8 only.

    3. "The loyalty payment amount exceeds what is allowed for this loyalty card in this transaction" - for this to work one should make sure that:

    • Loyalty scheme is configured with the proper redemption rules. A loyalty scheme defines what loyalty rules apply to what channels. A redemption rule defines what points can be used to pay for what product by what rate in what time period.
    • The loyalty card has enough points that is specified in the redemption rule.
  • Hitesh Manglani Profile Picture
    Hitesh Manglani 312 on at
    RE: Online Store Payment Issues

    Hi Sergey,

    I added the online store currency to the test connector's supported currencies and its now opening the credit card page iframe but I get the message

    The service call is taking longer than expected. Please wait for it to respond or refresh the page and try again.

    On enabling the Retail Server Debug Logs, I get the below few logs related to the payment page.

    Finished executing CRT request post-trigger 'Microsoft.Dynamics.Commerce.Runtime.Workflow.Composition.PipelineRequestTrigger' for request type 'Microsoft.Dynamics.Commerce.Runtime.Messages.GetCardPaymentAcceptPointRequest'.  Correlation Id: '{dd435d1b-3416-4aef-bf6b-25a03599db06}'.

    Started executing CRT request post-trigger 'Microsoft.Dynamics.Commerce.Runtime.Workflow.Composition.PipelineRequestTrigger' for request type 'Microsoft.Dynamics.Commerce.Runtime.Messages.GetCardPaymentAcceptPointRequest'.  Correlation Id: '{dd435d1b-3416-4aef-bf6b-25a03599db06}'.

    Finished executing CRT request handler for request handler 'Microsoft.Dynamics.Commerce.Runtime.Workflow.GetCardPaymentAcceptPointRequestHandler' and request type 'Microsoft.Dynamics.Commerce.Runtime.Messages.GetCardPaymentAcceptPointRequest'.  Correlation Id: '{7fce9d76-88c3-4af2-97b9-9decb0b62bb3}'.

  • SergeyP Profile Picture
    SergeyP 2,928 on at
    RE: Online Store Payment Issues

    Couple of additional thoughts:

    • Consider attaching a debugger to w3wp process (the one which belongs to eCommerce), don't forget to enable in Visual Studio a checkbox to Break on Common Language Runtime Exceptions. What I hope you will see - is exact place where NullReferenceException is taking place
    • If by any reason you will not be able to follow the advice above consider this (you will need to elaborate more but this will give you good enough chances to narrow it down): the SDK you have should have sources for the method GetCardPaymentAcceptPoint, so you can either rebuild that DLL (in case you don't have the PDB for the above suggestion), and the, you should be able to find a problem by debugging it again, or, you can put there additional logging to, again, narrow down the issue.
  • SergeyP Profile Picture
    SergeyP 2,928 on at
    RE: Online Store Payment Issues

    Are you seeing that NullReferenceException for your channel or for the channel available out of the box?

    Please enable debug log for Retail Server (to do that right click Debug under Commerce-RetailServer and select "Enable Log", then reproduce the problem again and see whether it will contain a message

    Completed Payment.GetCardPaymentAcceptPoint or not.

    Please also send here other logs which might seem related from the Debug log.

  • Hitesh Manglani Profile Picture
    Hitesh Manglani 312 on at
    RE: Online Store Payment Issues

    Hello Sergey, thank you for your reply. Yes I am using the LCS Demo VM hosted in Azure.

    If I use the channel deployed out of the box I do get the payment frame loaded in page. However it does not allow me to enter values as it displays a message saying The service call is taking longer than expected. Please wait for it to respond or refresh the page and try again. On refresh I am taken back to the earlier step of checkout.

    If i use the new online storee that i have created, i get the error message as mentioned in my earlier post. Below are the Retail Server and Online channel logs

    Retail Server Log-

    An error occurred while trying to send all bufferred output to the client. Exception: System.NullReferenceException: Object reference not set to an instance of an object.

      at Microsoft.Dynamics.Commerce.Runtime.Services.CardPaymentService.GetCardPaymentAcceptPoint(GetCardPaymentAcceptPointServiceRequest request)

      at Microsoft.Dynamics.Commerce.Runtime.Services.CardPaymentService.Execute(Request request)

      at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers

    Online Store Log-

    Online storefront encountered an unexpected exception. RequestUri: tbspsguatecom.cloudax.dynamics.com/.../GetCardPaymentAcceptPoint. Exception: Contoso.Commerce.RetailProxy.RetailProxyException: Exception of type 'Contoso.Commerce.RetailProxy.RetailProxyException' was thrown.An error occurred on server while processing this request.

      at Contoso.Commerce.RetailProxy.CommunicationExceptionHelper.ThrowAsCommerceException(Exception exception) in I:\RetailSDK\Proxies\RetailProxy\Exceptions

  • SergeyP Profile Picture
    SergeyP 2,928 on at
    RE: Online Store Payment Issues

    Are you using LCS Demo VM deployed in Azure? If you use (in eCommerce) the Online Channel deployed out of the box on the VM - are you able to complete the payment by using that channel or it also shows the same problem?

    Please look into Event Viewer for errors/warnings from RS/eCommerce - they might bring more light to the problem.  The logs are located at Applications and Services Logs->Microsoft->Dynamics

    eCommerce logs are in the Operational under Commerce-OnlineStore

    RS logs are in the Operational under Commerce-RetailServer

    P. S. As for the difference in SerivceAccountID - that is normal and by design.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans