Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Pay - nefunkcne overovanie podpisu (poradie parametrov) #45

Open
KamikX opened this issue Aug 7, 2023 · 6 comments
Open

Google Pay - nefunkcne overovanie podpisu (poradie parametrov) #45

KamikX opened this issue Aug 7, 2023 · 6 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@KamikX
Copy link

KamikX commented Aug 7, 2023

Ahojte,

viem ze tu nieco podobne bolo uz reportovane v inom issue #8 (comment) podla komenarov fixnute 19.7. ale zda sa ze tento problem stale pretrvava minimalne na integracnom prostredi s rovnakymi priznakmi, vsetky ine overenia podpisov funguju spravne az na toto.

Prijate data

array:5 [
  "resultCode" => 0
  "resultMessage" => "OK"
  "dttm" => "20230807200943"
  "signature" => "PODPIS"
  "initParams" => array:16 [
    "apiVersion" => 2
    "apiVersionMinor" => 0
    "paymentMethodType" => "CARD"
    "allowedCardNetworks" => array:2 [
      0 => "VISA"
      1 => "MASTERCARD"
    ]
    "allowedCardAuthMethods" => array:2 [
      0 => "PAN_ONLY"
      1 => "CRYPTOGRAM_3DS"
    ]
    "assuranceDetailsRequired" => false
    "billingAddressRequired" => false
    "billingAddressParametersFormat" => "FULL"
    "tokenizationSpecificationType" => "PAYMENT_GATEWAY"
    "gateway" => "csob"
    "gatewayMerchantId" => "MERCHANT_ID"
    "googlepayMerchantId" => "GOOGLE_MERCHANT_ID"
    "merchantName" => "WEB_URL"
    "environment" => "TEST"
    "totalPriceStatus" => "FINAL"
    "countryCode" => "CZ"
  ]
]

Testovany retazec:
"0|OK|20230807200943|2|0|CARD|VISA|MASTERCARD|PAN_ONLY|CRYPTOGRAM_3DS|false|false|FULL|PAYMENT_GATEWAY|csob|MERCHANT_ID|GOOGLE_MERCHANT_ID|WEB_URL|TEST|FINAL|CZ"

Mozno by bolo fajn pridat nieco podobne pre debugging na styl REQUEST_TEXT_TO_SIGN len opacne RESPONSE_TEXT_TO_SIGN aby sme vedeli overit ci spravne skladame retazec na overenie podpisu v pripade response.

Možnost debuggingu hodnoty RETEZEC_ZPRAVY pro POST a PUT metody

API v integrační prostředí vrací pro každý POST a PUT požadavek speciální HTTP response header REQUEST_TEXT_TO_SIGN. Obsahuje hodnotu RETEZEC_ZPRAVY sestavenou z parametrů přijatého požadavku (platební brána tuto hodnotu následně použije pro ověření podpisu požadavku). Pomocí této response header si může obchodník zkontrolovat, zda hodnota RETEZEC_ZPRAVY sestavená na straně eshopu odpovídá tomu, co sestaví platební brána.

Dakujem.

@mjanek

This comment was marked as resolved.

@mjanek mjanek added bug Something isn't working help wanted Extra attention is needed labels Aug 7, 2023
@KamikX
Copy link
Author

KamikX commented Aug 11, 2023

@mjanek Dobry den, mame nejaky update k tomuto problemu? overovanie mi nefunguje ani pri endpointe googlepay/init, myslim ze to moze sposobovat poradie parametrov vo vyskladanom retazci, napriklad pri klasickom payment/init je uvedene ze vrati nasledovne kde je payId na prvom mieste, realne to ale vrati

{
    "dttm": "20230811123558",
    "signature": "DATA",
    "payId": "fd991dc4eda4@IH",
    "resultCode": 0,
    "resultMessage": "OK",
    "paymentStatus": 1
}

ak ma niekto potom postavenu logiku vyskladania retazca na podpis automaticky ze prejde zaradom cele pole a podpolia (s vynimkami na niektore kluce) vznikne retazec ktory neprejde nesedi to voci tomu co je pozadovane podla dokumentacie

Dakujem.

@jgrmelova

This comment was marked as resolved.

@janbrasna janbrasna changed the title Google Pay - echo nefunkcne overovanie podpisu Google Pay - nefunkcne overovanie podpisu (poradie parametrov) Aug 14, 2023
@KamikX

This comment was marked as outdated.

@jgrmelova
Copy link

Dobrý den,

u metody echo je pořadí v podpisu následující:

echo:

  • dttm
  • resultcode
  • resultMessage

initParams:

  • apiVersion
  • apiVersionMinor
  • paymentMethodType
  • [allowedCardNetworks]
  • [allowedCardAuthMethods]
  • assuranceDetailsRequired
  • billingAddressRequired
  • billingAddressParametersFormat
  • tokenizationSpecificationType
  • gateway
  • gatewayMerchantId
  • googlepayMerchantId
  • merchantName
  • environment
  • totalPriceStatus
  • countryCode

Pro metodu init:

  • payId
  • dttm
  • resultCode
  • resultMessage
  • paymentStatus
  • statusDetail

actions (browserChallenge):

  • url
  • method

V případě doplňujících dotazů, jsem Vám k dispozici.

Jana Grmelová

@KamikX
Copy link
Author

KamikX commented Aug 22, 2023

@jgrmelova Dakujem za doplnujuce informacie, chyba bola teda na mojej strane, zle poradie parametrov / zly retazec na overenie.
Bude poradie parametrov voci dokumentacii v buducnosti zosuladene?

Dakujem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants