Hello all, I hope I will be able to find answer here because an error itself is not very informative. The problem is simple - I dynamically create secured Buy Button and for some reason the PP doesn't like what I POST. BTW, trying this form shows me the same error - https://www.paypal.com/cgi-bin/webscr?cmd=p/xcl/rec/ewp-techview-outside. So, what I did is I generated private key and public key. I registered public key with PayPal and I have my certificate ID. I used this information to wrote a code in C# (http://forums.asp.net/t/1236969.aspx?Paypal+Encrypted+Website+Payments+EWP+Solution) because I couldn't find the official code sample. The signature with my private key and encryption with PayPal's public key happens w/o any issues. As a result I get form which looks like this (actual data is truncated): <form id="dynamic-pp-form" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----
MIICqwYJKoZIhvcN...14GHvq63KEZ0/a4z11tWCHH7tAo
-----END PKCS7-----">
</form> The data that gets signed and encrypted is a string with new line symbols "\n" to separate items i.e. StringBuilder sbData = new StringBuilder();
sbData.Append("cmd=_xclick\n");
sbData.Append("business=XXX\n");
sbData.Append("item_name=XXX\n");
sbData.Append("item_number=XXX\n");
...
sbData.Append("cert_id=XXX"); I have also tried "\r\n" (AppendLine() method) and still no luck. Is it something I'm doing wrong and may be there is a way to get more informative error that would tell me that I have invalid signature or that the data that I signed has invalid formatting etc... Thank you very much in advance. -- Best Regards
... View more