2012-04-16 100 views
2

即時通訊使用ExpressIonEngine,並有一些模塊簡單商務,它不提供我想要的。PayPal加密購物車數據

,我需要,但後來我想改善它,所以在車一切都應該被加密,因此沒有人可以改變DOM或什麼創造了一切... :)

這裏是例如數組,我加密,但是當我將表單提交給PayPal Sandbox時,我得到如下錯誤:我們無法解密證書ID。

Array 
(
    [cmd] => _cart 
    [business] => [email protected] 
    [cert_id] => *********** // hidden off course 
    [upload] => 1 
    [return] => http://SomeDomain.com/shop/thanks/ 
    [cancel_return] => http://SomeDomain.com/shop/ 
    [lc] => EN 
    [currency_code] => EUR 
    [custom] => 1 
    [item_number_1] => 711 
    [item_name_1] => Some Issue 03 
    [amount_1] => 5.90 
    [quantity_1] => 3 
    [item_number_2] => 708 
    [item_name_2] => Some Issue 02 
    [amount_2] => 1.00 
    [quantity_2] => 5 
) 

形式是這樣的:加密的

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> 
    <input type="hidden" name="cmd" value="_s-xclick"> 
    <input type="hidden" name="encrypted" value="-----BEGIN PKCS7----- 
MIIIMwYJKoZIhvcNAQcDoIIIJDCCCCACAQAxggEwMIIBLAIBADCBlDCBjjELMAkG 
A1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQw 
EgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UE 
AxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJ 
KoZIhvcNAQEBBQAEgYB9MZM/Jb6UbHsStVMBFfO5fz6oTNZ0dGIf2H3h7vfyLdE3 
kWuMiN46EUcguses8uDezIbIsEGH/7J4sgJqsqfA5kf3nwmuzETCpGOBgzTK96JK 
QwABQPBsh4uwVC0Hbq9jT1KuYF35pmdFRo5ZG6UHzsG4jgSiSJjqdVVW7zyI3DCC 
BuUGCSqGSIb3DQEHATAUBggqhkiG9w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bbWkQzXw5OYcL4twF9wRLFwb8MMfGBRwRBS39ScYgfa29xdRahkvNu 
HWmAPb03M46bkAWM/PY6XJdJIAuX3qAgrftIEO9D4hDZlxyxs0OVy/ARrKwpPpMK 
8/WV9Lf52fz/Kk657eQe5N5+W00Wqpor3bFzP4z6XazxP7bSpNhhOudQx3cKEBlK 
LlWYRd867FHu0+vcHr3jri1+VeoUX1f2XxmYNjKHxsDWYBdFbEWN 
-----END PKCS7-----"> 
    <input type="submit" value="Checkout With PayPal" /> 
    </form> 

試過2路。

  1. ExpressionEngine function encrypt_data()。這很有效,但只適用於一種產品,並直接添加到PayPal購物車。當我從上面的數組傳遞數據到相同的加密函數時,PayPal無法解密證書ID?!
  2. 也嘗試從here功能,但同樣的問題...貝寶不能解密certificate_id。

我知道一切正常,因爲本地EE功能起作用。 任何人都可以幫助我,並建議做什麼?

在此先感謝

回答