”@

Home 

c# Programming Glossary: lc

iPlanet LDAP and C# PageResultRequestControl

http://stackoverflow.com/questions/1646518/iplanet-ldap-and-c-sharp-pageresultrequestcontrol

. Here's a code snippet to get you started LdapConnection lc new LdapConnection ldap.server.name Reading the Root DSE can.. be set to Anonymous when connecting to some directories lc.AuthType AuthType.Anonymous using lc Issue a base level search.. to some directories lc.AuthType AuthType.Anonymous using lc Issue a base level search request with a null search base SearchRequest..

How can I use the button tag with ASP.NET?

http://stackoverflow.com/questions/187482/how-can-i-use-the-button-tag-with-asp-net

control collection in this implementation LiteralControl lc new LiteralControl this.Text Controls.Add lc Add a value for.. lc new LiteralControl this.Text Controls.Add lc Add a value for base.Text for the parent class If the following..

tessnet2 fails to load

http://stackoverflow.com/questions/2053575/tessnet2-fails-to-load

54 List tessnet2.Word r1 ocr.DoOCR bmp Rectangle.Empty int lc tessnet2.Tesseract.LineCount r1 when i try to run the program..

is there a elegant way to parse a word and add spaces before capital letters

http://stackoverflow.com/questions/3103730/is-there-a-elegant-way-to-parse-a-word-and-add-spaces-before-capital-letters

Regex r new Regex @ A Z A Z a z # UC before me UC lc after me ^A Z A Z # Not UC before me UC after me A Za z ^A Za..

How to create Encrypted PayNow button “on the fly” for Third-party customers, using Paypal NVP API?

http://stackoverflow.com/questions/9939960/how-to-create-encrypted-paynow-button-on-the-fly-for-third-party-customers-us

know why... bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount lc IT bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount button_subtype.. 0N0qN3TiBL 1 L EjpO1jeqPaJC1fDi cC6t6tTbQ55Od4poT8xjSzNH5S48iHdZh0C7EqfE1MPCc2coJqCSpDqxmOrO 9QXsjHWAnx6sb6foHHpsPm7WgQyUmDsNwTWT3OGR398ERmBzzcoL5owf3zBSpRP0NlTWonPMCAwEAAaOB DCB9TAdBgNVHQ4EFgQUgy4i2asqiC1rp5Ms81Dx8nfVqdIwgcUGA1UdIwSBvTCBuoAUgy4i2asqiC1rp5Ms81Dx8nfVqdKhgZ6kgZswgZgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTEVMBMGA1UEChMMUGF5UGFsLCBJbmMuMRYwFAYDVQQLFA1zYW5kYm94X2NlcnRzMRQwEgYDVQQDFAtzYW5kYm94X2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH MA0GCSqGSIb3DQEBBQUAA4GBAFc288DYGX GX2 WP dwdXwficf rlG 0V9GBPJZYKZJQ069W ZRkUuWFQ Opd2yhPpneGezmw3aU222CGrdKhOrBJRRcpoO3FjHHmXWkqgbQqDWdG7S l8n1QfDPp jpULOrcnGEUY41ImjZJTylbJQ1b5PBBjGiP0PpK48cdFMYIBpDCCAaACAQEwgZ4wgZgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTEVMBMGA1UEChMMUGF5UGFsLCBJbmMuMRYwFAYDVQQLFA1zYW5kYm94X2NlcnRzMRQwEgYDVQQDFAtzYW5kYm94X2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTIwNDAzMDcxMDA5WjAjBgkqhkiG9w0BCQQxFgQUl2SP4H6 jn0c8fejmdZ5IoeJcPMwDQYJKoZIhvcNAQEBBQAEgYCjmQurKhtDO2g9 qbrvaxXHVRMP54jncODgLAMbauYHALYJlk2r5k Q3x GAuuiaj47A0qGlPoyQ WddHYF0R4Ffph0ocrAXLH9RC8jz2Cqx rt 8FIa7h1OhDwIhJynJ6eIPMfzm3T0wytZa6x8GnZaOJ0MtKqOeojkZjL61feQ END PKCS7 input type image src https www.sandbox.paypal.com en_US i btn btn_buynow_LG.gif border 0 name submit alt PayPal Il sistema di pagamento online piĆ¹ facile e sicuro img alt border 0 src https www.sandbox.paypal.com it_IT i scr pixel.gif width 1 height 1 form And here is the error I get after clicking on this encrypted pay now button As you can see all the parameters item name price item_id... are correct. But I'm unable to understand why I'm getting this error. If you want to try this code you should substitute your API user password signature. The generated PayNow button only works when you are logged in your paypal sandbox account. Do you have any idea about how to solve this error Note after solving this issue I'll need to understand how to create encrypted button for a third paypal business account we will need to create encrypted button for paypal accounts of our customers . Using our API credentials customer merchant code and having our API credential configured up in our customers paypal account isn't enought... It say that merchant code is not valid. Probably I'm missing something... Update 2 It seem that I've found how to solve the aforementioned error simply remove the cmd _s xclick _xclick parameters. If the cmd is not specified the paynow button doesn't seem to generate any error. More testing is needed... anyway I've commented the code line in the code example. Now back to business. Let's do some testing and then find the proper way to create paynow button for third party paypal accounts. c# asp.net vb.net paypal paypal api share improve this question Ok finally I got it My objective is to create Encrypted PayNow buttons on the fly for some of our customers. Here is a brief explanation of how PayPal API works with Third party access. Create a Paypal Sandbox account here In this sandbox account create 2 new business account you should hook these business account to a credit card. This will mark these account as verified unless it won't work The first account account A will represent our company The second account account B will represent one of our customers log in account A and request the API credentials instructions here log in account B and grant API permission to account A instruction here check the paragraph Third party authentication Grant your cart the appropriate API authentication permissions grab the Api credentials of account A and put them in your source code grab Merchant ID and merchant Email of account B and put them in your source code run the code grab the returned html put it on a web page and test it it should works you need to be logged on your paypal sandbox account or the generated button wont works Why this simple and concise knowledge is timewastingly scattered among a countless number of PayPal help pages PayPal PDF manuals and third party blog post is beyond my understanding Anyway... Here is the working code in VB.Net Public Shared Sub PaypalThirdPartyPayNowButtonTest Dim bvCount As Integer 0 ''L_BUTTONVAR counter Dim NVP As New Dictionary Of String String ''Api Name Value Pair parameters ''define paypal SANDBOX server Dim paypalApiServerUrl As String https api 3t.sandbox.paypal.com nvp ''define Api credentials of YOUR business paypal account Dim yourApiUsername As String aso_1273063882_biz_api3.megatesto.it Dim yourApiPassword As String 1273063582 Dim yourApiSignature As String A22sd7623RGUsduDHDSFU57N7dfhfS23DUYVhdf85du8S6FJ6D5bfoh5 ''define Your CUSTOMER identification data Dim customerEmailID As String MyCustomer_143363961_biz@megatesto.it Dim customerMerchantID As String 3S4EF7BI96YHS ''use YOUR identification data NVP.Add USER yourApiUsername NVP.Add PWD yourApiPassword NVP.Add SIGNATURE yourApiSignature ''use your CUSTOMER identification data NVP.Add SUBJECT customerEmailID bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount business customerMerchantID ''Merchant ID ''Api method name and version NVP.Add METHOD BMCreateButton NVP.Add VERSION 85.0 ''method specific parameters NVP.Add BUTTONCODE ENCRYPTED NVP.Add BUTTONTYPE BUYNOW NVP.Add BUTTONSUBTYPE PRODUCTS ''Buynow button specific parameters bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount lc IT bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount button_subtype PRODUCTS bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount item_name Test_product bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount item_number 123456 bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount amount 12.00 bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount currency_code EUR bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount quantity 1 ''bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount cmd _s xclick 'DONT' specify the cmd parameter i.. MA0GCSqGSIb3DQEBBQUAA4GBAFc288DYGX GX2 WP dwdXwficf rlG 0V9GBPJZYKZJQ069W ZRkUuWFQ Opd2yhPpneGezmw3aU222CGrdKhOrBJRRcpoO3FjHHmXWkqgbQqDWdG7S l8n1QfDPp jpULOrcnGEUY41ImjZJTylbJQ1b5PBBjGiP0PpK48cdFMYIBpDCCAaACAQEwgZ4wgZgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTEVMBMGA1UEChMMUGF5UGFsLCBJbmMuMRYwFAYDVQQLFA1zYW5kYm94X2NlcnRzMRQwEgYDVQQDFAtzYW5kYm94X2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTIwNDAzMDcxMDA5WjAjBgkqhkiG9w0BCQQxFgQUl2SP4H6 jn0c8fejmdZ5IoeJcPMwDQYJKoZIhvcNAQEBBQAEgYCjmQurKhtDO2g9 qbrvaxXHVRMP54jncODgLAMbauYHALYJlk2r5k Q3x GAuuiaj47A0qGlPoyQ WddHYF0R4Ffph0ocrAXLH9RC8jz2Cqx rt 8FIa7h1OhDwIhJynJ6eIPMfzm3T0wytZa6x8GnZaOJ0MtKqOeojkZjL61feQ END PKCS7 input type image src https www.sandbox.paypal.com en_US i btn btn_buynow_LG.gif border 0 name submit alt PayPal Il sistema di pagamento online piĆ¹ facile e sicuro img alt border 0 src https www.sandbox.paypal.com it_IT i scr pixel.gif width 1 height 1 form And here is the error I get after clicking on this encrypted pay now button As you can see all the parameters item name price item_id... are correct. But I'm unable to understand why I'm getting this error. If you want to try this code you should substitute your API user password signature. The generated PayNow button only works when you are logged in your paypal sandbox account. Do you have any idea about how to solve this error Note after solving this issue I'll need to understand how to create encrypted button for a third paypal business account we will need to create encrypted button for paypal accounts of our customers . Using our API credentials customer merchant code and having our API credential configured up in our customers paypal account isn't enought... It say that merchant code is not valid. Probably I'm missing something... Update 2 It seem that I've found how to solve the aforementioned error simply remove the cmd _s xclick _xclick parameters. If the cmd is not specified the paynow button doesn't seem to generate any error. More testing is needed... anyway I've commented the code line in the code example. Now back to business. Let's do some testing and then find the proper way to create paynow button for third party paypal accounts. c# asp.net vb.net paypal paypal api share improve this question Ok finally I got it My objective is to create Encrypted PayNow buttons on the fly for some of our customers. Here is a brief explanation of how PayPal API works with Third party access. Create a Paypal Sandbox account here In this sandbox account create 2 new business account you should hook these business account to a credit card. This will mark these account as verified unless it won't work The first account account A will represent our company The second account account B will represent one of our customers log in account A and request the API credentials instructions here log in account B and grant API permission to account A instruction here check the paragraph Third party authentication Grant your cart the appropriate API authentication permissions grab the Api credentials of account A and put them in your source code grab Merchant ID and merchant Email of account B and put them in your source code run the code grab the returned html put it on a web page and test it it should works you need to be logged on your paypal sandbox account or the generated button wont works Why this simple and concise knowledge is timewastingly scattered among a countless number of PayPal help pages PayPal PDF manuals and third party blog post is beyond my understanding Anyway... Here is the working code in VB.Net Public Shared Sub PaypalThirdPartyPayNowButtonTest Dim bvCount As Integer 0 ''L_BUTTONVAR counter Dim NVP As New Dictionary Of String String ''Api Name Value Pair parameters ''define paypal SANDBOX server Dim paypalApiServerUrl As String https api 3t.sandbox.paypal.com nvp ''define Api credentials of YOUR business paypal account Dim yourApiUsername As String aso_1273063882_biz_api3.megatesto.it Dim yourApiPassword As String 1273063582 Dim yourApiSignature As String A22sd7623RGUsduDHDSFU57N7dfhfS23DUYVhdf85du8S6FJ6D5bfoh5 ''define Your CUSTOMER identification data Dim customerEmailID As String MyCustomer_143363961_biz@megatesto.it Dim customerMerchantID As String 3S4EF7BI96YHS ''use YOUR identification data NVP.Add USER yourApiUsername NVP.Add PWD yourApiPassword NVP.Add SIGNATURE yourApiSignature ''use your CUSTOMER identification data NVP.Add SUBJECT customerEmailID bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount business customerMerchantID ''Merchant ID ''Api method name and version NVP.Add METHOD BMCreateButton NVP.Add VERSION 85.0 ''method specific parameters NVP.Add BUTTONCODE ENCRYPTED NVP.Add BUTTONTYPE BUYNOW NVP.Add BUTTONSUBTYPE PRODUCTS ''Buynow button specific parameters bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount lc IT bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount button_subtype PRODUCTS bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount item_name Test_product bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount item_number 123456 bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount amount 12.00 bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount currency_code EUR bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount quantity 1 ''bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount cmd _s xclick 'DONT' specify the cmd parameter if you specify it it wont work paypal will give you an error ''build the parameter string Dim paramBuilder As New StringBuilder For Each kv As KeyValuePair Of String String In NVP Dim st As String st kv.Key HttpUtility.UrlEncode kv.Value paramBuilder.Append st Next Dim param As String param paramBuilder.ToString param param.Substring 0 param.Length 1 ''remove the last ' ' ''Create web request and web response objects make sure you using the correct server sandbox live Dim wrWebRequest As HttpWebRequest DirectCast WebRequest.Create paypalApiServerUrl HttpWebRequest wrWebRequest.Method POST Dim requestWriter As New StreamWriter wrWebRequest.GetRequestStream requestWriter.Write param requestWriter.Close '' Get the responseReader Dim responseReader As StreamReader responseReader New StreamReader wrWebRequest.GetResponse .GetResponseStream ''read the response Dim responseData As String responseData responseReader.ReadToEnd responseReader.Close ''url decode the results Dim result As String result HttpUtility.UrlDecode respon..