Git Product home page Git Product logo

Comments (10)

yansongda avatar yansongda commented on August 17, 2024

回调商品名称中乱码是因为 支付宝使用 GBK 的编码导致直接 print_r 出来会乱码,但不影响验签的。

所以,是否中文和验签成功与否没有关系。

同时,自己亲生实践,商品名称中包含中文是不影响验签的。

感谢您的支持!

同时,如果您线上环境支持 PHP7.0 建议升级至 v2.x 版本,这个版本做了很多优化。包括您说的编码问题。

from pay.

Gilbertat avatar Gilbertat commented on August 17, 2024

我也是第一次用,包真的超好用。
我再次检查了公钥设置,依然是走的验签失败,由于调起的是 app 支付,所以gateway是不是要填写'app'?

from pay.

yansongda avatar yansongda commented on August 17, 2024

验签时不用填的。

请问您开发环境支持 PHP7.0+ 吗?如果支持,方便的话,麻烦直接升级到 2.x 吧。

from pay.

Gilbertat avatar Gilbertat commented on August 17, 2024

好吧,是PHP7+ 那我重新写一下吧,在laravel的用法和普通的一样吗?

from pay.

yansongda avatar yansongda commented on August 17, 2024

可以直接下载 laravel-pay 扩展包。用法基本一样的。

from pay.

Gilbertat avatar Gilbertat commented on August 17, 2024

好的谢谢

from pay.

yansongda avatar yansongda commented on August 17, 2024

@Gilbertat 请问升级后问题解决了吗?

from pay.

Gilbertat avatar Gilbertat commented on August 17, 2024

@yansongda 还没有换,正准备,如果有问题我会联系你的 😊

from pay.

Gilbertat avatar Gilbertat commented on August 17, 2024

@yansongda 使用 2.0版本 无法获得sign

$alipay = Pay::alipay()->app($config_order);

return show('1', "请求成功", ['sign' => $alipay]);

输出是这样的

{
    "status": "1",
    "message": "请求成功",
    "data": {
        "sign": {
            "headers": {}
        }
    }
}

dd($alipay)则有如下输出

Response {#444
  +headers: ResponseHeaderBag {#445
    #computedCacheControl: array:2 [
      "no-cache" => true
      "private" => true
    ]
    #cookies: []
    #headerNames: array:2 [
      "cache-control" => "Cache-Control"
      "date" => "Date"
    ]
    #headers: array:2 [
      "cache-control" => array:1 [
        0 => "no-cache, private"
      ]
      "date" => array:1 [
        0 => "Thu, 28 Dec 2017 10:22:33 GMT"
      ]
    ]
    #cacheControl: []
  }
  #content: "app_id=2017090608590288&method=alipay.trade.app.pay&format=JSON&charset=utf-8&sign_type=RSA2&version=1.0&return_url=&notify_url=http%3A%2F%2Fwww.mitte.cn%2Fapi%2Falipay%2Fnotify&timestamp=2017-12-28+18%3A22%3A33&sign=A2xEa6%2FiN2o21kD8PU4Ao95NF05%2BkmarT7wJ9b5RbpjSrvZqm0%2BSYR4hAnIzr9PgDBBQtoGIwujr%2F9eIxg%2Fvj4oyHuSxCF%2FkqBXZhqBqY4B0A%2FzEXOpfg%2BflKBrZDFn5bIUAecTf1vYTNgmHNH%2BRMa95Kb61psWuraBTnJLHXrz40wUm23Oc0ZSLTfT6trJ%2BrRyJa9pFDHG53nVYgBLrdXmVPaL4OmSUxMEALOiV%2FNVamfhPDlMXxbezIkXRRyr1JxC6eiFotnwPuXMsCuDg4Hm7%2BXv%2FHfDjEgmHZBbSGUoq31ByDCD0Yo4Xh%2B1FjA6ddni%2FSqXqcfzVx25p0I8Wlg%3D%3D&biz_content=%7B%22out_trade_no%22%3A15134884178798981%2C%22total_amount%22%3A%221199.00%22%2C%22subject%22%3A%22LIEMOCH%5Cu5229%5Cu9a6c%5Cu8d6b+%5Cu7231%5Cu52d2%5Cu7cfb%5Cu5217+%5Cu8de8%5Cu754c%5Cu5b9a%5Cu5236%5Cu62c9%5Cu6746%5Cu7bb1%22%2C%22product_code%22%3A%22CURITY_PAY%22%7D"
  #version: "1.0"
  #statusCode: 200
  #statusText: "OK"
  #charset: null
}

from pay.

yansongda avatar yansongda commented on August 17, 2024

麻烦请看文档 https://yansongda.gitbooks.io/pay/

from pay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.