如果你和我一样,在调试支付宝接口的时候提示:验签失败
这种情况该如何处理呢?
其实:
一般情况下是公钥不对 ,应该使用支付宝公钥,不是应用公钥。
我当时就是把两者混淆了,所以现在加了特别注释,以防混淆。
// 千万记住,这里填写支 付宝公钥,而不是应用公钥 'ali_public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn6loxOvrK2oashxfZztPIS/4DzA0bVq//5FHp3uXKEg40565m+jFwWDAy kmt9uvhiHp2aOmeUPoe59a05GPsuC5uP3w3haIrZEuvVcKO0wsjH9TPJXNcIPh7wVAsB+CN/A10C1Ig4jq8sig98w+vIsGrxzk/RYkWtclzadw7VtZ9BZR/1m2whg4HsMH5B5k24IvupzkaqnOZ 5gqZUoDtzgGDKp7MNfHU6SOrm6X+ovMm9kLWt5Ou8KVZh5r2Hl4WDf+Sn67KYltmDGZ4SX1dlumxWA33gqZUEJ71LDzJFjq/C16VarzznJaRZNpBdYvrrXd2+zZYTraPJGLnqPnjIQIDAQA B', // 应用私钥,加密方式 : **RSA2** 'private_key' => 'MIIEowIBAAKCAQEAvZFcFcD2aX89IZhAdUSaQoD9U0302siLi1WOlW005pX+D8dnoa+YFWN0s/o2cmM9GcmQ e/r2he/H3JtY+lpMmx3mBQLCBYHjnuZW19d0HOK8LxrgdWKJsZ7PyU6fkB+BdpfbEWtdWn3tFAZES+GdoCwTgDMqvCHKonIfU3nsgGxxj9v3SSxbt9EIq8uJFfCWs2NW1hpUvNZIYFXXDbsC 0k+5m+O/jprPiTPscPe8EZQJYcP6E4Q9ORb2PsQ/ai9bp2y863FDnPUQ+OSUlhXQEVbhJ9LeCJAX8RYIP+3mVzIDHjZEPh11qF7l+pNweQU3zK7GFNXWjYEAesIH2xdv0QIDAQABAoIBACEC ctqG42Gzel2jOXYyH/p8o6Ah7wU57rKwj0eN4KxWagstWepZvU3cJ7I/W8PHbBhVdQdhyBPCkTblBjVyC+zm4+rzc/2phI1i5rRnHBz7jnFVaMiIBBod4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