Mastercard / mastercard-api-client-tutorial

Generating and Configuring a Mastercard API Client
https://mstr.cd/2AWz6pm
MIT License
60 stars 61 forks source link

Failed asserting that null matches expected 'APPROVED'. #29

Closed ratiodavinder closed 2 years ago

ratiodavinder commented 2 years ago

I am using PHP library for tokenization and tried to run the test case, but it is returning error message and the response does not contain any data. I also tried the step by step guide (https://developer.mastercard.com/platform/documentation/security-and-authentication/generating-and-configuring-a-mastercard-api-client/#step-by-step-guide) and that is also returning the same result. Please see the attached screenshot for reference.

image image

Akshaykdubey commented 2 years ago

Hi @ratiodavinder Thanks for raising the issue. I tried reproducing the issue but the tests works fine. We are asserting the values of Decision and PaymentAccountReference in the test and the response have both the values. Pasting snippets of the response:

["response_host"]=>
    string(36) "site.1.sample.service.mastercard.com"
    ["response_id"]=>
    string(6) "123456"
    ["decision"]=>
    string(8) "APPROVED"
    ["authentication_methods"]=>
     object(DigitalEnablementClient\Model\TokenDetailData)#66 (1) {
          ["container":protected]=>
          array(1) {
            ["payment_account_reference"]=>
            string(29) "500181d9f8e0629211e3949a08002"
          }

Let us know if you can provide the exact the steps to reproduce. Also the version of php you are using.

Thanks!

ratiodavinder commented 2 years ago

Hello Akshay,

Thanks for your response.

If we talk about the GitHub repo specifically, I followed the below steps

I also tried to add "public_key_fingerprint" as mentioned in the above shared link, but didn't get any success. I added it in FundingAccountInfoEncryptedPayload for testing.

I am using PHP 7.4, please let me know if I am missing something.

Thanks, Davinder

ratiodavinder commented 2 years ago

Hello Akshay,

Please let me know if there is any update.

Regards, Davinder

Akshaykdubey commented 2 years ago

Hi Davinder, Can you confirm if you are using the encrypt and decrypt cert/key provided in the document of the API?

Akshaykdubey commented 2 years ago

Hi @ratiodavinder, The encrypt/decrypt cert/key provided in the document seems to be causing the issue. I have contacted the service team to rectify it. I will update when we have some confirmation.

Thanks!

ratiodavinder commented 2 years ago

Hello @Akshaykdubey,

Like I mentioned earlier, I am using the encryption certificates provided at https://developer.mastercard.com/mdes-digital-enablement/documentation/tutorials/create-a-new-project/#6-download-client-encryption-key-sandbox

Thanks

Advancedlux commented 2 years ago

Hello Akshaykdubey,

Have we resolved the issue with the cert/key provided in the document? What are our next steps please?

Thanks, Travis

Akshaykdubey commented 2 years ago

Hi @Advancedlux We are following up with the team. We will get back to you once we have the fix.

Thanks!

Advancedlux commented 2 years ago

Hello, Do we have an update yet? Thanks, Travis

Advancedlux commented 2 years ago

Hello @Akshaykdubey, It has been almost a month. May we please get an update on how to proceed? Thanks, Travis

Akshaykdubey commented 2 years ago

Hi @Advancedlux , We checked with MDES Digital Enablement team that returns the null response that you reported. As this isn't a problem with the tutorial or guide referenced, MDES Digital Enablement team requested you to to get in touch with them directly at digital.support@mastercard.com When you do so, please be aware that you will be asked to provide your company and contact details by the support team.

Thanks, Akshay