OpenCart和Square付款-优惠券发行

时间:2020-07-01 22:26:09

标签: square opencart-3

使用Square作为Opencart 3.0.3.2版上的支付网关。在我们提供优惠券和折扣之前,一切都很好。

优惠券是在OpenCart中创建的,可提供10%的折扣。 当客户购买并应用代码时,它将提供正确的折扣。 然后,客户继续付款。 Square成功处理付款,而不是返回成功消息,而是返回错误。订单立即被取消。 SQUARE仪表板上显示的付款成功。

显示给客户的确切错误消息是: 意外的网站错误。请通过+44 1234567或通过电子邮件admin@myemail.com与商店所有者联系。请注意,您的交易可能会被处理。“

很多时候,客户再次尝试并最终在卡上产生多次费用,这需要几天的时间才能退款。

已经梳理了整个互联网以寻求解决方案。

iSenselab对我说:“一旦订单被正方形确认,也会将响应发送回分机。”因此,我怀疑某个地方的某些回调函数不匹配。折扣价格低于预期价格,并会引发错误或某些阻滞。

任何帮助将不胜感激。请让我知道您可能需要什么。 我在Opencart上启用了调试功能,并捕获了以下内容-

Below is from the error log:
2020-06-29 19:31:03 - SQUAREUP DEBUG START...
2020-06-29 19:31:03 - SQUAREUP ENDPOINT: https://connect.squareup.com/v2/locatio ... ansactions
2020-06-29 19:31:03 - SQUAREUP HEADERS: Array
(
[0] => Authorization: Bearer EAAAEOhBJTifYE8c2OGJ-Iik8D9lThKw31-XqU51oJ-WgHw06Tm5NsXJhwW
[1] => Content-Type: application/json
[2] => Square-Version: 2018-09-18
)

2020-06-29 19:31:03 - SQUAREUP PARAMS: {"note":"Order #360","reference_id":"360","idempotency_key":"5efa417797","amount_money":{"amount":1447,"currency":"GBP"},"billing_address":{"first_name":"A","last_name":"A","address_line_1":"FLAT 1, ","address_line_2":"B","locality":"M KEYNES","sublocality":"Buckinghamshire","postal_code":"MK2","country":"GB","organization":"A"},"buyer_email_address":"admin@co.uk","delay_capture":false,"integration_id":"sqi_65a5ac54459940e3600a8561829","shipping_address":{"first_name":"S ","last_name":"A","address_line_1":"5 , ","address_line_2":"S,","locality":"R,","sublocality":"Berkshire","postal_code":"RG7","country":"GB","organization":""},"card_nonce":"cnon:CBESEPYVmjHBrDFO8OC7v0"}
2020-06-29 19:31:05 - SQUAREUP VERBOSE LOG:
* Trying 74.122.189.132:443...
* Connected to connect.squareup.com (74.123.189.152) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Square, Inc.; CN=*.squareup.com
* start date: Dec 4 19:05:22 2019 GMT
* expire date: Dec 3 19:35:22 2020 GMT
* subjectAltName: host "connect.squareup.com" matched cert's "*.squareup.com"
* issuer: C=US; O=Entrust, Inc.; OU=See www.entrust.net/legal-terms; OU=(c) 2012 Entrust, Inc. - for authorized use only; CN=Entrust Certification Authority - L1K
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x559eace90e80)
> POST /v2/locations/1WHB8909E6AR4/transactions HTTP/2
Host: connect.squareup.com
accept: */*
authorization: Bearer EAAAEOhBJTifYE8c2OGJ-Iik8D9lThKw31-XqU51oJ-WgHw06Tm5NsXJhw
content-type: application/json
square-version: 2018-09-18
content-length: 799

* We are completely uploaded and fine
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200
< content-type: application/json
< square-version: 2018-09-18
< vary: Origin, Accept-Encoding
< x-content-type-options: nosniff
< x-download-options: noopen
< x-frame-options: SAMEORIGIN
< x-permitted-cross-domain-policies: none
< x-xss-protection: 1; mode=block
< date: Mon, 29 Jun 2020 19:31:05 GMT
< content-length: 603
< strict-transport-security: max-age=631152000; includeSubDomains; preload
<
* Connection #0 to host connect.squareup.com left intact
=========
2020-06-29 19:31:05 - SQUAREUP RESULT: {"transaction":{"id":"F3CZpj5Gn1S69ta5EiBm","location_id":"1WHB8909E","created_at":"2020-06-29T19:31:05Z","tenders":[{"id":"3jGBOVepJkBF691oGpZekcCCvaB","location_id":"1WHB8909E6","transaction_id":"F3CZpj5Gn1S69ta5EiBmC","created_at":"2020-06-29T19:31:04Z","note":"Order #360","amount_money":{"amount":1447,"currency":"GBP"},"type":"CARD","card_details":{"status":"CAPTURED","card":{"card_brand":"MASTERCARD","last_4":"2000","fingerprint":"sq-1-31J68_SYUTZqFCP3DSCkrQX92FeNfcmgPUlGUg0zV_ybSm4gFM1Cq6aI5l"},"entry_method":"KEYED"}}],"reference_id":"360","product":"EXTERNAL_API"}}

0 个答案:

没有答案