Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

NCDevCon Sept 2011

slide deck and sample code
  • Loading branch information...
commit d95b7961fc653cac03a012e0b8ebfe73dfedb815 1 parent e5950ef
@SidneyAllen authored
Showing with 21,579 additions and 0 deletions.
  1. BIN  NCDevCon-Sept2011/X.commerce-NCDevCon.pptx
  2. +42 −0 NCDevCon-Sept2011/ncdevcon/ap-lib/services/CallerService.cfc
  3. +136 −0 NCDevCon-Sept2011/ncdevcon/button-manager/Application.cfc
  4. +48 −0 NCDevCon-Sept2011/ncdevcon/button-manager/ajax.cfm
  5. +77 −0 NCDevCon-Sept2011/ncdevcon/button-manager/buttonmanager.cfc
  6. +68 −0 NCDevCon-Sept2011/ncdevcon/button-manager/index.cfm
  7. +38 −0 NCDevCon-Sept2011/ncdevcon/button-manager/lib/DirectPayment.cfc
  8. +173 −0 NCDevCon-Sept2011/ncdevcon/button-manager/lib/ExpressCheckout.cfc
  9. +53 −0 NCDevCon-Sept2011/ncdevcon/button-manager/lib/RecurringPayment.cfc
  10. +164 −0 NCDevCon-Sept2011/ncdevcon/button-manager/lib/Transaction.cfc
  11. +118 −0 NCDevCon-Sept2011/ncdevcon/button-manager/lib/services/CallerService.cfc
  12. +22 −0 NCDevCon-Sept2011/ncdevcon/button-manager/lib/services/DisplayService.cfc
  13. +152 −0 NCDevCon-Sept2011/ncdevcon/checkout01/Application.cfc
  14. +80 −0 NCDevCon-Sept2011/ncdevcon/checkout01/checkout02.cfm
  15. +87 −0 NCDevCon-Sept2011/ncdevcon/checkout01/checkout03.cfm
  16. +75 −0 NCDevCon-Sept2011/ncdevcon/checkout01/checkout04.cfm
  17. +174 −0 NCDevCon-Sept2011/ncdevcon/checkout01/css/sdk.css
  18. BIN  NCDevCon-Sept2011/ncdevcon/checkout01/images/horse.jpg
  19. +23 −0 NCDevCon-Sept2011/ncdevcon/checkout01/index.cfm
  20. +139 −0 NCDevCon-Sept2011/ncdevcon/checkout02/Application.cfc
  21. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/ajax-loader.png
  22. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icon-search-black.png
  23. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icons-18-black.png
  24. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icons-18-white.png
  25. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icons-36-black.png
  26. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icons-36-white.png
  27. +1,643 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/jquery.mobile-1.0b2.css
  28. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/images/12-eye.png
  29. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/images/background.jpg
  30. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/images/icon-eye-18.png
  31. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/images/icon-eye-36.png
  32. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/images/myWineIcon.png
  33. +18 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/jquery-1.6.2.min.js
  34. +6,259 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/jquery.mobile-1.0b2.js
  35. +1 −0  NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/json2.js
  36. +2,381 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/persistence.js
  37. +286 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/persistence.min.js
  38. +236 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/persistence.store.memory.js
  39. +893 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/persistence.store.sql.js
  40. +121 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/persistence.store.sqlite.js
  41. +216 −0 NCDevCon-Sept2011/ncdevcon/checkout02/assets/js/persistence.store.websql.js
  42. +80 −0 NCDevCon-Sept2011/ncdevcon/checkout02/checkout02.cfm
  43. +106 −0 NCDevCon-Sept2011/ncdevcon/checkout02/checkout03.cfm
  44. +174 −0 NCDevCon-Sept2011/ncdevcon/checkout02/css/sdk.css
  45. BIN  NCDevCon-Sept2011/ncdevcon/checkout02/images/horse.jpg
  46. +47 −0 NCDevCon-Sept2011/ncdevcon/checkout02/index.cfm
  47. +134 −0 NCDevCon-Sept2011/ncdevcon/checkout03/Application.cfc
  48. +80 −0 NCDevCon-Sept2011/ncdevcon/checkout03/checkout02.cfm
  49. +87 −0 NCDevCon-Sept2011/ncdevcon/checkout03/checkout03.cfm
  50. +75 −0 NCDevCon-Sept2011/ncdevcon/checkout03/checkout04.cfm
  51. +174 −0 NCDevCon-Sept2011/ncdevcon/checkout03/css/sdk.css
  52. BIN  NCDevCon-Sept2011/ncdevcon/checkout03/images/horse.jpg
  53. +23 −0 NCDevCon-Sept2011/ncdevcon/checkout03/index.cfm
  54. +156 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/Application.cfc
  55. +1 −0  NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/_notes/dwsync.xml
  56. +20 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/cancel.cfm
  57. +130 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/connect.cfc
  58. +38 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/DirectPayment.cfc
  59. +173 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/ExpressCheckout.cfc
  60. +64 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/ExpressCheckoutOLD.cfc
  61. +49 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/RecurringPayment.cfc
  62. +160 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/Transaction.cfc
  63. +1 −0  NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/_notes/dwsync.xml
  64. +114 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/services/CallerService.cfc
  65. +21 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/services/DisplayService.cfc
  66. +1 −0  NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/lib/services/_notes/dwsync.xml
  67. +67 −0 NCDevCon-Sept2011/ncdevcon/embedded/coldfusion/success.cfm
  68. +1 −0  NCDevCon-Sept2011/ncdevcon/embedded/css/_notes/dwsync.xml
  69. +1 −0  NCDevCon-Sept2011/ncdevcon/embedded/css/images/_notes/dwsync.xml
  70. BIN  NCDevCon-Sept2011/ncdevcon/embedded/css/images/close.png
  71. BIN  NCDevCon-Sept2011/ncdevcon/embedded/css/images/controls.png
  72. +50 −0 NCDevCon-Sept2011/ncdevcon/embedded/css/style.css
  73. +1 −0  NCDevCon-Sept2011/ncdevcon/embedded/images/_notes/dwsync.xml
  74. BIN  NCDevCon-Sept2011/ncdevcon/embedded/images/angrybirds.png
  75. BIN  NCDevCon-Sept2011/ncdevcon/embedded/images/trans.png
  76. +65 −0 NCDevCon-Sept2011/ncdevcon/embedded/index.html
  77. +1 −0  NCDevCon-Sept2011/ncdevcon/embedded/js/_notes/dwsync.xml
  78. +840 −0 NCDevCon-Sept2011/ncdevcon/embedded/js/dg-mod.js
  79. +27 −0 NCDevCon-Sept2011/ncdevcon/embedded/js/game.js
  80. +18 −0 NCDevCon-Sept2011/ncdevcon/embedded/js/jquery-1.6.2.min.js
  81. +161 −0 NCDevCon-Sept2011/ncdevcon/embedded/js/xconnect.js
  82. +240 −0 NCDevCon-Sept2011/ncdevcon/embedded/js/xconnectOLD.js
  83. +28 −0 NCDevCon-Sept2011/ncdevcon/index.html
  84. BIN  NCDevCon-Sept2011/ncdevcon/ipn/filecontent.pdf
  85. BIN  NCDevCon-Sept2011/ncdevcon/ipn/form.pdf
  86. +37 −0 NCDevCon-Sept2011/ncdevcon/ipn/index.cfm
  87. +62 −0 NCDevCon-Sept2011/ncdevcon/ipn/ipn.cfm
  88. BIN  NCDevCon-Sept2011/ncdevcon/ipn/requestdata.pdf
  89. +38 −0 NCDevCon-Sept2011/ncdevcon/lib/DirectPayment.cfc
  90. +173 −0 NCDevCon-Sept2011/ncdevcon/lib/ExpressCheckout.cfc
  91. +53 −0 NCDevCon-Sept2011/ncdevcon/lib/RecurringPayment.cfc
  92. +164 −0 NCDevCon-Sept2011/ncdevcon/lib/Transaction.cfc
  93. +114 −0 NCDevCon-Sept2011/ncdevcon/lib/services/CallerService.cfc
  94. +22 −0 NCDevCon-Sept2011/ncdevcon/lib/services/DisplayService.cfc
  95. +85 −0 NCDevCon-Sept2011/ncdevcon/simplepay/Application.cfc
  96. +20 −0 NCDevCon-Sept2011/ncdevcon/simplepay/index.cfm
  97. +19 −0 NCDevCon-Sept2011/ncdevcon/simplepay/pay.cfm
  98. +152 −0 NCDevCon-Sept2011/ncdevcon/subscription01/Application.cfc
  99. +80 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/AuthorizationReceipt.cfm
  100. +37 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/BillOutStandingAmt.cfm
  101. +57 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoAuthorization.cfm
  102. +76 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoCapture.cfm
  103. +76 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoCaptureReceipt.cfm
  104. +214 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoDirectPayment.cfm
  105. +72 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoDirectPaymentReceipt.cfm
  106. +74 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoExpressCheckoutPayment.cfm
  107. +43 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoReauthorization.cfm
  108. +74 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoReauthorizationReceipt.cfm
  109. +39 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoVoid.cfm
  110. +82 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/DoVoidReceipt.cfm
  111. +16 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/GetBalance.cfm
  112. +74 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/GetBalanceReceipt.cfm
  113. +83 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/GetExpressCheckoutDetails.cfm
  114. +40 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/GetTransactionDetails.cfm
  115. +137 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/MassPay.cfm
  116. +83 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/MassPayReceipt.cfm
  117. +78 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/OutstandingAmtReceipt.cfm
  118. +283 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RPcreateProfile.cfm
  119. +33 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RPgetProfileDetails.cfm
  120. +42 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RPmanageProfile.cfm
  121. +81 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RPmanageProfileStatus.cfm
  122. +83 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RPprofile.cfm
  123. +73 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RPprofileDetails.cfm
  124. +24 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RecurringPaymentsIndex.cfm
  125. +75 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RefundReceipt.cfm
  126. +68 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/RefundTransaction.cfm
  127. +87 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/ReviewOrder.cfm
  128. +124 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/SetExpressCheckout.cfm
  129. +181 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/ThreeDSecure.cfm
  130. +91 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/ThreeDSecureReceipt.cfm
  131. +100 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/TransactionDetails.cfm
  132. +53 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/TransactionSearch.cfm
  133. +135 −0 NCDevCon-Sept2011/ncdevcon/subscription01/archive/TransactionSearchResults.cfm
  134. +174 −0 NCDevCon-Sept2011/ncdevcon/subscription01/css/sdk.css
  135. +21 −0 NCDevCon-Sept2011/ncdevcon/subscription01/index.cfm
  136. +73 −0 NCDevCon-Sept2011/ncdevcon/subscription01/sub02.cfm
  137. +86 −0 NCDevCon-Sept2011/ncdevcon/subscription01/sub03.cfm
  138. +81 −0 NCDevCon-Sept2011/ncdevcon/subscription01/sub04.cfm
  139. +83 −0 NCDevCon-Sept2011/ncdevcon/subscription01/sub05.cfm
  140. +23 −0 NCDevCon-Sept2011/ncdevcon/subscription01/sub06.cfm
View
BIN  NCDevCon-Sept2011/X.commerce-NCDevCon.pptx
Binary file not shown
View
42 NCDevCon-Sept2011/ncdevcon/ap-lib/services/CallerService.cfc
@@ -0,0 +1,42 @@
+<cfscript>
+/*
+CallerService.cfc
+This ColdFusion component reused by all sample page to get credential information and
+it has getNVPResponse method which takes nvpString as parameter and return Nvpresponse
+as CF Struct object. using this object we can display the response values
+*/
+component output="false" {
+
+ serverURL = "https://svcs.sandbox.paypal.com/AdaptivePayments/Pay";
+
+ public any function doHttppost( required struct requestData ) {
+
+ var httpService = new http();
+ httpService.setMethod("post");
+ httpService.setCharset("utf-8");
+ httpService.setUrl(serverURL);
+
+ for (key in requestData)
+ {
+ httpService.addParam(type="formfield",name="#key#",value="#requestData[key]#",encoded="yes");
+ }
+
+ httpService.addParam(type="header",name="X-PAYPAL-SECURITY-USERID",value="sidney_1311957058_biz_api1.x.com",encoded="yes");
+ httpService.addParam(type="header",name="X-PAYPAL-SECURITY-PASSWORD",value="1311957099",encoded="yes");
+ httpService.addParam(type="header",name="X-PAYPAL-SECURITY-SIGNATURE",value="AsWOI0XsYOW6SY4-RFW6nmQX9L2GAx2Dvzlusmnc2lLkNlYS6cilwiEc",encoded="yes");
+ httpService.addParam(type="header",name="X-PAYPAL-DEVICE-IPADDRESS",value="cgi.remote_addr",encoded="yes");
+ httpService.addParam(type="header",name="X-PAYPAL-REQUEST-DATA-FORMAT",value="NV",encoded="yes");
+ httpService.addParam(type="header",name="X-PAYPAL-RESPONSE-DATA-FORMAT",value="JSON",encoded="yes");
+ httpService.addParam(type="header",name="X-PAYPAL-APPLICATION-ID",value="APP-80W284485P519543T",encoded="yes");
+
+ httpService.addParam(type="body",value="&actionType=PAY&trackingID=12345&cancelUrl=http://www.x.com&currencyCode=USD&receiverList.receiver(0).amount=50.00&receiverList.receiver(0).email=nc1_1316197521_per@x.com&receiverList.receiver(1).amount=99.00&receiverList.receiver(1).email=nc2_1316197650_per@x.com&requestEnvelope.errorLanguage=en_US&returnUrl=http://www.x.com/test/return.cfm",encoded="yes");
+
+ var result = httpService.send().getPrefix();
+
+ return deserializeJSON(result.filecontent);
+
+ }
+
+}
+
+</cfscript>
View
136 NCDevCon-Sept2011/ncdevcon/button-manager/Application.cfc
@@ -0,0 +1,136 @@
+<cfscript>
+/**
+@dateCreated "July 18, 2011"
+@hint "You implement methods in Application.cfc to handle ColdFusion application events and set variables in the CFC to configure application characteristics."
+*/
+
+
+component output="false" {
+
+ /* **************************** APPLICATION VARIABLES **************************** */
+ THIS.name = "NCDevConCheckout01";
+ THIS.applicationTimeout = createTimeSpan(0, 2, 0, 0);
+
+
+ customtagpaths = "#getDirectoryFromPath(ExpandPath('../lib/'))#";
+ THIS.customTagPaths = customtagpaths;
+
+ THIS.serverSideFormValidation = true;
+ THIS.sessionManagement = true;
+ THIS.sessionTimeout = createTimeSpan(0, 0, 30, 0);
+
+ THIS.setClientCookies = true;
+ THIS.setDomainCookies = false;
+
+ THIS.scriptProtect = true;
+ THIS.secureJSON = false;
+ THIS.secureJSONPrefix = "";
+
+
+ THIS.enablerobustexception = true;
+
+
+/* **************************** APPLICATION METHODS **************************** */
+
+ public void function onApplicationEnd(struct ApplicationScope=structNew()) {
+
+ return;
+ }
+
+
+ public boolean function onApplicationStart() {
+
+ return true;
+ }
+
+
+
+ public void function onRequestEnd() {
+
+ return;
+ }
+
+
+ public boolean function onRequestStart(required string TargetPage) {
+
+ request.serverURL = "https://api-3t.sandbox.paypal.com/nvp";
+
+ /* SUBJECT to be uncommented for UNIPAY all the other credentials like API username,
+ password,signature can be commented for UNIPAY
+ To enable Payments for Third Party Email whcih will be passed along with Partner's 3token credentials
+ uncomment both subject and 3 token credentials.
+ */
+
+
+ //request.SUBJECT="sidney@x.com";
+
+ APIuserName = "sidney_1311957058_biz_api1.x.com";
+ APIPassword = "1311957099";
+ APISignature = "AsWOI0XsYOW6SY4-RFW6nmQX9L2GAx2Dvzlusmnc2lLkNlYS6cilwiEc";
+
+
+ //condition to check if it is UNIPAY
+ if (isdefined("SUBJECT") && (isdefined("APIuserName") eq "false" && isdefined("APIPassword") eq "false" && isdefined("APISignature") eq "false") )
+ {
+ request.UNIPAYSUBJECT="#SUBJECT#";
+ request.USER = "";
+ request.PWD = "";
+ request.SIGNATURE = "";
+ }
+
+
+
+ //condition to check if it is Payments for Third Party Email
+ if (isdefined("SUBJECT") && isdefined("APIuserName") && isdefined("APIPassword") && isdefined("APISignature"))
+ {
+ request.UNIPAYSUBJECT="#SUBJECT#";
+ request.USER = "#APIuserName#";
+ request.PWD = "#APIPassword#";
+ request.SIGNATURE = "#APISignature#";
+ }
+
+
+ //condition to check if it is 3 token credentials
+ if (isdefined("SUBJECT") eq "false" && isdefined("APIuserName") && isdefined("APIPassword") && isdefined("APISignature") )
+ {
+ request.UNIPAYSUBJECT="";
+ request.USER = "#APIuserName#";
+ request.PWD = "#APIPassword#";
+ request.SIGNATURE = "#APISignature#";
+ }
+
+
+ request.PayPalURL = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=";
+ request.version = "78";
+
+ /*
+ By default the API requests doesn't go through proxy. To route the requests through a proxy server
+ set "useProxy" value as "true" and set values for proxyName and proxyPort. Set proxyName with
+ the Host Name or the IP address of the proxy server. proxyPort should be a valid port number.
+ eg:
+ useProxy = "true";
+ proxyName = "127.0.0.1";
+ proxyPort = "8081";
+ */
+
+ request.useProxy = "false";
+ request.proxyName = "";
+ request.proxyPort = "";
+
+ return true;
+ }
+
+
+ public void function onSessionEnd(required struct SessionScope, struct ApplicationScope=structNew()) {
+
+ return;
+ }
+
+
+ public void function onSessionStart() {
+
+ return;
+ }
+
+}
+</cfscript>
View
48 NCDevCon-Sept2011/ncdevcon/button-manager/ajax.cfm
@@ -0,0 +1,48 @@
+<html>
+<head>
+ <title>Button Manager</title>
+ <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
+
+ <script>
+ $(document).ready(function() {
+
+
+ $('#createButton').live('click',function(e)
+ {
+
+ $.ajax({
+ url: 'buttonmanager.cfc',
+ data: 'method=BMCreateButton',
+ success: function(data){
+ var obj = $.parseJSON(data);
+ console.log(obj['code']);
+ $('#ppButton').append(obj['code']);
+
+ },
+ error: function(request, textStatus, error){
+
+ }
+ });
+
+ });
+
+ });
+ </script>
+
+
+</head>
+<body>
+
+<a href="#" id="createButton">create button</a>
+<p id="ppButton">
+
+</p>
+
+
+
+<br><br>
+<a href="../index.html">home</a>
+
+
+</body>
+</html>
View
77 NCDevCon-Sept2011/ncdevcon/button-manager/buttonmanager.cfc
@@ -0,0 +1,77 @@
+<cfcomponent>
+ <cfscript>
+
+ // create our objects to call methods on
+ caller = createObject("component","lib.services.CallerService");
+ /*
+ serverName = SERVER_NAME;
+ serverPort = CGI.SERVER_PORT;
+ contextPath = GetDirectoryFromPath(#SCRIPT_NAME#);
+ protocol = CGI.SERVER_PROTOCOL;
+ */
+ </cfscript>
+
+ <cffunction name="BMCreateButton" access="remote" returntype="any" returnFormat="JSON">
+
+ <cfscript>
+ var responseStruct="";
+ var returnObj = StructNew();
+
+ try {
+ // create our objects to call methods on
+
+ data = StructNew();
+ data.USER = request.USER;
+ data.PWD = request.PWD;
+ data.SIGNATURE = request.SIGNATURE;
+ data.VERSION = "84";
+
+ data.URLBASE = request.serverURL;
+ data.USEPROXY = false;
+
+ data.METHOD = "BMCreateButton";
+
+ data.BUTTONCODE = "cleartext"; // hosted, encrypted, cleartext
+ data.BUTTONTYPE = "buynow";
+
+ //data.L_BUTTONVAR0 = "business=sidney_1311957058_biz@x.com";
+ data.L_BUTTONVAR1 = "item_name=T-shirt";
+ data.L_BUTTONVAR2 = "amount=20.00";
+ //data.L_BUTTONVAR3 = "no_shipping=1";
+ //data.L_BUTTONVAR4 = "currency_code=USD";
+ //data.L_BUTTONVAR5 = "no_note=1";
+
+ response = caller.doHttppost(data);
+
+ responseStruct = caller.getNVPResponse(#URLDecode(response)#);
+
+ if (responseStruct.Ack is not "Success")
+ {
+ Throw(type="InvalidData",
+ message="Response:#responseStruct.Ack#, ErrorCode: #responseStruct.L_ERRORCODE0#,
+ Message: #responseStruct.L_LONGMESSAGE0#");
+
+ } else {
+ code = responseStruct.websitecode;
+ }
+
+
+ returnObj['success'] = true;
+ returnObj['code'] = code;
+
+ }
+
+ catch(any e)
+ {
+ returnObj['success'] = true;
+ returnObj['error'] = e.message;
+ }
+
+
+ return serializeJSON(returnObj);
+ </cfscript>
+
+ </cffunction>
+
+
+</cfcomponent>
View
68 NCDevCon-Sept2011/ncdevcon/button-manager/index.cfm
@@ -0,0 +1,68 @@
+<cfoutput>
+<html>
+<head>
+ <title>Subscription process</title>
+ <link href="sdk.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<cfscript>
+code = "";
+responseStruct="";
+ try {
+ // create our objects to call methods on
+ caller = createObject("CallerService");
+
+ data = StructNew();
+ data.USER = request.USER;
+ data.PWD = request.PWD;
+ data.SIGNATURE = request.SIGNATURE;
+ data.VERSION = "78";
+
+ data.SERVERURL = request.serverURL;
+ data.USEPROXY = false;
+
+ data.METHOD = "BMCreateButton";
+
+ data.BUTTONCODE = "hosted";
+ data.BUTTONTYPE = "buynow";
+
+ data.L_BUTTONVAR0 = "business=sidney_1311957058_biz@x.com";
+ data.L_BUTTONVAR1 = "item_name=Virtual Cow";
+ data.L_BUTTONVAR2 = "amount=1.50";
+ data.L_BUTTONVAR3 = "no_shipping=1";
+ data.L_BUTTONVAR4 = "currency_code=USD";
+ data.L_BUTTONVAR5 = "no_note=1";
+
+ response = caller.doHttppost(data);
+
+ responseStruct = caller.getNVPResponse(#URLDecode(response)#);
+
+ if (responseStruct.Ack is not "Success")
+ {
+ Throw(type="InvalidData",message="Response:#responseStruct.Ack#, ErrorCode: #responseStruct.L_ERRORCODE0#, Message: #responseStruct.L_LONGMESSAGE0#");
+
+ } else {
+ code = responseStruct.websitecode;
+ }
+
+ }
+
+ catch(any e)
+ {
+ writeOutput("Error: " & e.message);
+ writeDump(responseStruct);
+ }
+
+</cfscript>
+
+
+#code#
+
+
+
+<br><br>
+<a href="../index.html">home</a>
+
+</body>
+</html>
+</cfoutput>
View
38 NCDevCon-Sept2011/ncdevcon/button-manager/lib/DirectPayment.cfc
@@ -0,0 +1,38 @@
+<cfscript>
+/** @accessors true */
+
+component {
+
+ public DirectPayment function init() {
+
+ return this;
+ }
+
+ public struct function setDirectPaymentData(required struct form,required struct request,struct data) {
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ result.expDate = form.expDateMonth & form.expDateYear;
+ result.SUBJECT = request.UNIPAYSUBJECT;
+
+ return result;
+ }
+
+ public struct function setDirectPayment3DData(required struct form,required struct request,struct data) {
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+
+ result.startDate = Form.startDateMonth & Form.startDateYear;
+ result.expDate = form.expDateMonth & form.expDateYear;
+ result.SUBJECT = request.UNIPAYSUBJECT;
+
+ return result;
+ }
+
+}
+</cfscript>
View
173 NCDevCon-Sept2011/ncdevcon/button-manager/lib/ExpressCheckout.cfc
@@ -0,0 +1,173 @@
+<cfscript>
+/** @accessors true */
+
+component {
+
+ public ExpressCheckout function init() {
+
+ return this;
+ }
+
+ public struct function setExpressCheckoutData(required struct form,required struct request,struct data) {
+
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+
+ var itemAmt = 0;
+ var itemCnt = 0;
+ var PAYMENTREQUEST_0_AMT = 0;
+ if (isDefined('form.itemCnt'))
+ {
+ itemCnt = form.itemCnt;
+ } else if (isDefined('data.itemCnt')) {
+ itemCnt = data.itemCnt;
+ }
+
+
+
+ for (i=0; i LT itemCnt; i = i+1)
+ {
+ setVariable('qty', 'form.L_QTY' & i);
+ setVariable('amt', 'form.L_AMT' & i);
+ if (isDefined(qty) and isDefined(amt))
+ {
+ itemAmt = itemAmt + (#Evaluate('form.L_QTY' & i)# * #Evaluate('form.L_AMT' & i)#);
+ }
+
+ setVariable('qty', 'form.L_PAYMENTREQUEST_0_QTY' & i);
+ setVariable('amt', 'form.L_PAYMENTREQUEST_0_AMT' & i);
+ if (isDefined(qty) and isDefined(amt))
+ {
+ itemAmt = itemAmt + (#Evaluate('form.L_PAYMENTREQUEST_0_QTY' & i)# * #Evaluate('form.L_PAYMENTREQUEST_0_AMT' & i)#);
+ }
+
+ setVariable('qty', 'data.L_QTY' & i);
+ setVariable('amt', 'data.L_AMT' & i);
+ if (isDefined(qty) and isDefined(amt))
+ {
+ itemAmt = itemAmt + (#Evaluate('data.L_QTY' & i)# * #Evaluate('form.L_AMT' & i)#);
+ }
+
+ setVariable('qty', 'data.L_PAYMENTREQUEST_0_QTY' & i);
+ setVariable('amt', 'data.L_PAYMENTREQUEST_0_AMT' & i);
+ if (isDefined(qty) and isDefined(amt))
+ {
+ itemAmt = itemAmt + (#Evaluate('data.L_PAYMENTREQUEST_0_QTY' & i)# * #Evaluate('data.L_PAYMENTREQUEST_0_AMT' & i)#);
+ }
+
+ }
+
+
+
+ if (isDefined('data.ITEMAMT'))
+ {
+ itemAmt= DecimalFormat(data.ITEMAMT);
+ }
+
+ if (isDefined('form.ITEMAMT'))
+ {
+ itemAmt= DecimalFormat(form.ITEMAMT);
+ }
+ result.itemAmt= DecimalFormat(itemAmt);
+
+ if (NOT isDefined('data.L_PAYMENTREQUEST_0_AMT'))
+ {
+ result.PAYMENTREQUEST_0_AMT = DecimalFormat(itemAmt);
+ }
+
+
+ //Calculating amount = itemamount+ shippingamt+shippingdisc+taxamt+insuranceamount;
+ var amt = 0;
+ var SHIPPINGAMT = 0;
+ var SHIPDISCAMT = 0;
+ var TAXAMT = 0;
+ var INSURANCEAMT = 0;
+ var paymentaction = '';
+ var currencyCodeType = '';
+
+ if (isDefined('data.SHIPPINGAMT'))
+ {
+ SHIPPINGAMT = data.SHIPPINGAMT;
+ }
+
+ if (isDefined('data.SHIPDISCAMT'))
+ {
+ SHIPDISCAMT = data.SHIPDISCAMT;
+ }
+
+ if (isDefined('data.TAXAMT'))
+ {
+ TAXAMT = data.TAXAMT;
+ }
+
+ if (isDefined('data.INSURANCEAMT'))
+ {
+ INSURANCEAMT = data.INSURANCEAMT;
+ }
+
+ if (isDefined('form.paymentaction'))
+ {
+ result.paymentaction = form.paymentaction;
+ }
+
+ if (isDefined('data.paymentaction'))
+ {
+ result.paymentaction = data.paymentaction;
+ }
+
+ if (isDefined('form.currencyCodeType'))
+ {
+ currencyCodeType = form.currencyCodeType;
+ }
+
+ amt= #DecimalFormat(Evaluate(#itemAmt# + SHIPPINGAMT + SHIPDISCAMT + TAXAMT + INSURANCEAMT))#;
+
+ result.amt = amt;
+
+ // calculating maxamt
+ result.maxamt=#DecimalFormat(Evaluate(#amt# + 25))#;
+
+ // set cancel URL
+ result.cancelURL = "http://" & data.serverName & ":" & data.serverPort & data.contextPath & data.cancelPage &"?paymentaction=" & paymentaction;
+
+ // set return URL
+ result.returnURL = "http://" & data.serverName & ":" & data.serverPort & data.contextPath & data.returnPage & "?amt=#amt#&currencycode=#currencyCodeType#&paymentaction=#paymentaction#";
+
+ return result;
+ }
+
+
+ public struct function setGetCheckoutData(required struct request,required struct data) {
+ var result = structNew();
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+
+ return result;
+ }
+
+ public struct function setDoCheckoutData(required struct form,required struct request,struct data) {
+ var result = structNew();
+
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+
+ if (isDefined('form.paymentaction'))
+ {
+ paymentaction = form.paymentaction;
+ }
+
+ if (isDefined('data.paymentaction'))
+ {
+ paymentaction = data.paymentaction;
+ }
+
+ return result;
+ }
+
+}
+</cfscript>
View
53 NCDevCon-Sept2011/ncdevcon/button-manager/lib/RecurringPayment.cfc
@@ -0,0 +1,53 @@
+<cfscript>
+/** @accessors true */
+
+component {
+
+ public RecurringPayment function init() {
+
+ return this;
+ }
+
+ public struct function setRecurringPaymentData(required struct form,required struct request,struct data) {
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ if(isDefined('form.expDateMonth'))
+ {
+ result.expDate = form.expDateMonth & form.expDateYear;
+ }
+ result.SUBJECT = request.UNIPAYSUBJECT;
+ result.PROFILESTARTDATE = Form.profileStartDateYear &"-"& Form.profileStartDateMonth &"-"& Form.profileStartDateDay & "T01:00:00,0Z";
+
+ return result;
+ }
+
+
+ public struct function setRecurringPaymentStatusData(required struct form,required struct request,struct data) {
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+
+ result.SUBJECT = "";
+
+ return result;
+ }
+
+ public struct function setBillOutstandingData(required struct form,required struct request,struct data) {
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+
+ result.SUBJECT = "";
+
+ return result;
+ }
+
+}
+</cfscript>
View
164 NCDevCon-Sept2011/ncdevcon/button-manager/lib/Transaction.cfc
@@ -0,0 +1,164 @@
+<cfscript>
+/** @accessors true */
+
+component {
+
+ public Administrative function init() {
+
+ return this;
+ }
+
+ public struct function setAdministrativeData(required struct form,required struct request,struct data,struct url) {
+
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ result.subject = "";
+ result.transactionID = "";
+ if (StructKeyExists(Form, "transactionID"))
+ {
+ result.transactionID = Form.transactionID;
+ }
+
+ if(StructKeyExists(URL, "transactionID"))
+ {
+ result.transactionID = URL.transactionID;
+ }
+
+ return result;
+ }
+
+ public struct function setVoidData(required struct form,required struct request,struct data) {
+
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ result.subject = request.UNIPAYSUBJECT;
+
+ return result;
+ }
+
+
+ public struct function setBalanceData(required struct request,required struct data) {
+
+ var result = structNew();
+
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ result.subject = request.UNIPAYSUBJECT;
+
+ return result;
+ }
+
+
+ public struct function setMassPayData(required struct form,required struct request,struct data) {
+ var caller = createObject("CallerService");
+
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ result.subject = request.UNIPAYSUBJECT;
+
+ var receivermailArray = ListToArray(form.receiveremail);
+ var amtArray = ListToArray(form.amt);
+ var uidArray = ListToArray(form.uniqueID);
+ var noteArray = ListToArray(form.note);
+ var size = ArrayLen(receivermailArray);
+
+ note = caller.populateEmptyValue(noteORuid=#noteArray#,size=#size#);
+ noteArray = note;
+
+ uid = caller.populateEmptyValue(noteORuid=#uidArray#,size=#size#);
+ uidArray = uid;
+
+ for (i=1; i LTE size; i = i+1)
+ {
+ email = "L_EMAIL" & (i-1);
+ amt = "L_Amt" & (i-1);
+ uniqueid = "L_UNIQUEID" & (i-1);
+ note = "L_NOTE" & (i-1);
+
+ StructInsert(result, email, receivermailArray[i]);
+ StructInsert(result, amt, amtArray[i]);
+ if(#ArrayLen(uidArray)# is not 0)
+ {
+ StructInsert(result, uniqueid, uidArray[i]);
+ }
+ if(#ArrayLen(noteArray)# is not 0)
+ {
+ StructInsert(result, note, noteArray[i]);
+ }
+ }
+
+ return result;
+ }
+
+ public struct function setTransactionSearchData(required struct form,required struct request,required struct data) {
+
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ result.subject = request.UNIPAYSUBJECT;
+
+
+
+ var fromDate = DateFormat(Form.startDateStr, "mm-dd-yyyy");
+ var month = month(fromDate);
+ var day = day(fromDate);
+ var year = year(fromDate);
+ result.STARTDATE = year &"-"& month &"-"& day & "T00:00:00Z";
+ if(Form.endDateStr IS NOT "")
+ {
+ var toDate = DateFormat(#Form.endDateStr#, "mm-dd-yyyy");
+ month = month(toDate);
+ day = day(toDate);
+ year = year(toDate);
+ result.ENDDATE = year &"-"& month &"-"& day & "T23:00:00Z";
+ }
+
+ return result;
+ }
+
+ public struct function setRefundData(required struct form,required struct request,required struct data) {
+
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ result.subject = request.UNIPAYSUBJECT;
+
+ if (Form.refundType is "Partial")
+ {
+ result.AMT = Form.amt;
+ }
+
+ return result;
+ }
+
+
+
+ public struct function setReauthorizationData(required struct form,required struct request,required struct data) {
+
+ var result = structNew();
+
+ structAppend(result,form,false);
+ structAppend(result,request,false);
+ structAppend(result,data,false);
+ result.subject = request.UNIPAYSUBJECT;
+
+ return result;
+ }
+
+
+
+}
+</cfscript>
View
118 NCDevCon-Sept2011/ncdevcon/button-manager/lib/services/CallerService.cfc
@@ -0,0 +1,118 @@
+<cfscript>
+/*
+CallerService.cfc
+This ColdFusion component reused by all sample page to get credential information and
+it has getNVPResponse method which takes nvpString as parameter and return Nvpresponse
+as CF Struct object. using this object we can display the response values
+*/
+component output="false" {
+
+ public string function doHttppost( required struct requestData ) {
+
+ var httpService = new http();
+ httpService.setMethod("post");
+ httpService.setCharset("utf-8");
+ httpService.setUrl(requestData.URLBASE);
+
+ if (requestData.useProxy is "true")
+ {
+ httpService.setProxyServer(requestData.proxyName);
+ httpService.setProxyPort(requestData.proxyPort);
+ }
+ var str = '';
+ for (key in requestData)
+ {
+ httpService.addParam(type="formfield",name="#key#",value="#requestData[key]#",encoded="yes");
+ str = str & key & '=' & requestData[key] & '&';
+ }
+
+ writeOutput(str);
+ abort;
+
+ var result = httpService.send().getPrefix();
+
+ return result.filecontent;
+ }
+
+ public struct function getNVPResponse(required string nvpString) {
+ var responseStruct = StructNew();
+ var keyValStruct = StructNew();
+ var keys = "";
+ var Values = "";
+ var nvpArray = ArrayNew(1) ;
+ var keyArray = ArrayNew(1) ;
+ var valueArray = ArrayNew(1) ;
+ var key = "";
+ var value = "";
+ var currentValue = "";
+ var tempVal = "";
+ var count = 1 ;
+ var tempvalue = "";
+ var lennvp = 0;
+
+ for (i=1;i LTE len(nvpString);i=i+1)
+ {
+ lennvp = lennvp + 1;
+ var index = 1;
+
+ if (#Mid(nvpString, i, 1)# is not "&")
+ {
+ tempVal = tempVal & #Mid(nvpString, i, 1)#;
+ }
+
+ if (#Mid(nvpString, i, 1)# is "&" OR "#lennvp#" is "#len(nvpString)#")
+ {
+ nvpArray[count] = #trim(tempVal)#;
+ count = count + 1;
+ tempVal = "";
+ }
+ }
+
+ for (i=1;i LTE #ArrayLen(nvpArray)#;i=i+1)
+ {
+ currentValue = #nvpArray[i]#;
+ currentKeyArray = ListToArray(currentValue,'=');
+ keyArray[i] = currentKeyArray[1];
+ }
+
+ vals = "";
+ key = "";
+
+ for (var i=1;i LT ArrayLen(nvpArray);i=i+1)
+ {
+ vals = #nvpArray[i]#;
+ key = #keyArray[i]#;
+
+ value = #RemoveChars(vals ,1, (len(key) +1))#;
+ valueArray[i] = value;
+ x = StructInsert(responseStruct,#trim(key)#,#trim(value)#);
+ }
+
+ return responseStruct;
+ }
+
+ public array function populateEmptyValue( required any noteORuid, required any size)
+ {
+
+ if (ArrayIsEmpty(noteORuid) )
+ {
+ for (i=1;i LTE size;i=i+1)
+ {
+ noteORuid[i] = "";
+ }
+
+ } else {
+
+ for (i=1;i LTE size;i=i+1)
+ {
+ if (ArrayLen(noteORuid) not equal size)
+ {
+ ArrayAppend(noteORuid, "");
+ }
+ }
+ }
+ return noteORuid;
+ }
+
+}
+</cfscript>
View
22 NCDevCon-Sept2011/ncdevcon/button-manager/lib/services/DisplayService.cfc
@@ -0,0 +1,22 @@
+<cfscript>
+/*
+CallerService.cfc
+This ColdFusion component reused by all sample page to get credential information and
+it has getNVPResponse method which takes nvpString as parameter and return Nvpresponse
+as CF Struct object. using this object we can pring the response values in Display.cfm page
+*/
+component output="false" {
+
+ public string function displayText(required struct data) {
+ var result = '<div class="displayText">';
+
+ for (key in data)
+ {
+ result = result & '<div class="key">#key#:</div><div class="value" >#data[key]#</div><div class="clear">&nbsp;</div>';
+
+ }
+ result = result & '</div>';
+ return result;
+ }
+}
+</cfscript>
View
152 NCDevCon-Sept2011/ncdevcon/checkout01/Application.cfc
@@ -0,0 +1,152 @@
+<cfscript>
+/**
+@dateCreated "July 18, 2011"
+@hint "You implement methods in Application.cfc to handle ColdFusion application events and set variables in the CFC to configure application characteristics."
+*/
+
+
+component output="false" {
+
+ /* **************************** APPLICATION VARIABLES **************************** */
+ THIS.name = "NCDevConCheckout01";
+ THIS.applicationTimeout = createTimeSpan(0, 2, 0, 0);
+
+
+ customtagpaths = "#getDirectoryFromPath(ExpandPath('../lib/'))#";
+ THIS.customTagPaths = customtagpaths;
+
+ THIS.serverSideFormValidation = true;
+ THIS.sessionManagement = true;
+ THIS.sessionTimeout = createTimeSpan(0, 0, 30, 0);
+
+ THIS.setClientCookies = true;
+ THIS.setDomainCookies = false;
+
+ THIS.scriptProtect = true;
+ THIS.secureJSON = false;
+ THIS.secureJSONPrefix = "";
+
+
+ THIS.enablerobustexception = true;
+
+
+/* **************************** APPLICATION METHODS **************************** */
+
+ public void function onApplicationEnd(struct ApplicationScope=structNew()) {
+
+ return;
+ }
+
+
+ public boolean function onApplicationStart() {
+
+ return true;
+ }
+
+ public void function onCFCRequest(required string cfcname, required string method, required string args) {
+
+ return;
+ }
+
+
+ public void function onRequestEnd() {
+
+ return;
+ }
+
+
+ public boolean function onRequestStart(required string TargetPage) {
+
+ request.serverURL = "https://api-3t.sandbox.paypal.com/nvp";
+
+ /* SUBJECT to be uncommented for UNIPAY all the other credentials like API username,
+ password,signature can be commented for UNIPAY
+ To enable Payments for Third Party Email whcih will be passed along with Partner's 3token credentials
+ uncomment both subject and 3 token credentials.
+ */
+
+
+ //request.SUBJECT="sidney@x.com";
+
+ APIuserName = "sidney_1311957058_biz_api1.x.com";
+ APIPassword = "1311957099";
+ APISignature = "AsWOI0XsYOW6SY4-RFW6nmQX9L2GAx2Dvzlusmnc2lLkNlYS6cilwiEc";
+
+
+
+
+
+
+ /*
+ request.SUBJECT="clip_1309031681_biz@paypal.com";
+
+ APIuserName = "clip_1309031681_biz_api1.paypal.com";
+ APIPassword = "1309031732";
+ APISignature = "AFcWxV21C7fd0v3bYYYRCpSSRl31An2lFbilAjH412uQjiC0OEJh45pL";
+ */
+
+ //condition to check if it is UNIPAY
+ if (isdefined("SUBJECT") && (isdefined("APIuserName") eq "false" && isdefined("APIPassword") eq "false" && isdefined("APISignature") eq "false") )
+ {
+ request.UNIPAYSUBJECT="#SUBJECT#";
+ request.USER = "";
+ request.PWD = "";
+ request.SIGNATURE = "";
+ }
+
+
+
+ //condition to check if it is Payments for Third Party Email
+ if (isdefined("SUBJECT") && isdefined("APIuserName") && isdefined("APIPassword") && isdefined("APISignature"))
+ {
+ request.UNIPAYSUBJECT="#SUBJECT#";
+ request.USER = "#APIuserName#";
+ request.PWD = "#APIPassword#";
+ request.SIGNATURE = "#APISignature#";
+ }
+
+
+ //condition to check if it is 3 token credentials
+ if (isdefined("SUBJECT") eq "false" && isdefined("APIuserName") && isdefined("APIPassword") && isdefined("APISignature") )
+ {
+ request.UNIPAYSUBJECT="";
+ request.USER = "#APIuserName#";
+ request.PWD = "#APIPassword#";
+ request.SIGNATURE = "#APISignature#";
+ }
+
+
+ request.PayPalURL = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=";
+ request.version = "78";
+
+ /*
+ By default the API requests doesn't go through proxy. To route the requests through a proxy server
+ set "useProxy" value as "true" and set values for proxyName and proxyPort. Set proxyName with
+ the Host Name or the IP address of the proxy server. proxyPort should be a valid port number.
+ eg:
+ useProxy = "true";
+ proxyName = "127.0.0.1";
+ proxyPort = "8081";
+ */
+
+ request.useProxy = "false";
+ request.proxyName = "";
+ request.proxyPort = "";
+
+ return true;
+ }
+
+
+ public void function onSessionEnd(required struct SessionScope, struct ApplicationScope=structNew()) {
+
+ return;
+ }
+
+
+ public void function onSessionStart() {
+
+ return;
+ }
+
+}
+</cfscript>
View
80 NCDevCon-Sept2011/ncdevcon/checkout01/checkout02.cfm
@@ -0,0 +1,80 @@
+<!--
+*************************************************
+ReviewOrder.cfm
+
+When click submit button in the setexpresscheckout.cfm, the page submitted in Orderreview.cfm
+it takes necessary values as parameter and pass into destination URL which returns token and
+payerid.This token we need to pass as parameter for getExpresscheckout which return shipping
+details. Then we need to pass payer id, token and other necessary information for doexpresschekout
+
+*************************************************
+-->
+<cfoutput>
+<html>
+<head>
+ <title>Subscription process</title>
+ <link href="sdk.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<cfscript>
+responseStruct="";
+ try {
+ // create our objects to call methods on
+ caller = createObject("CallerService");
+ ec = createObject("ExpressCheckout");
+
+ data = StructNew();
+ data.METHOD = "SetExpressCheckout";
+ data.L_PAYMENTREQUEST_0_ITEMCATEGORY0="Physical";
+ data.L_PAYMENTREQUEST_0_NAME0="Pillow Pet";
+ data.L_PAYMENTREQUEST_0_NUMBER0="666";
+ data.L_PAYMENTREQUEST_0_QTY0="1";
+ data.L_PAYMENTREQUEST_0_TAXAMT0="0";
+ data.L_PAYMENTREQUEST_0_AMT0="99.00";
+ data.L_PAYMENTREQUEST_0_DESC0="It's a pillow, it's a pet, it's a pillow pet!";
+ data.ITEMCNT= "1";
+ data.paymenAction= "sale";
+ data.paymentType="sale";
+
+ // set url info
+ data.serverName = SERVER_NAME;
+ data.serverPort = CGI.SERVER_PORT;
+ data.contextPath = GetDirectoryFromPath(#SCRIPT_NAME#);
+ data.protocol = CGI.SERVER_PROTOCOL;
+ data.cancelPage = "checkout01.cfm";
+ data.returnPage = "checkout03.cfm";
+
+ requestData = ec.setExpressCheckoutData(form,request,data);
+
+ response = caller.doHttppost(requestData);
+
+ responseStruct = caller.getNVPResponse(#URLDecode(response)#);
+
+ if (responseStruct.Ack is not "Success")
+ {
+ Throw(type="InvalidData",message="Response:#responseStruct.Ack#, ErrorCode: #responseStruct.L_ERRORCODE0#, Message: #responseStruct.L_LONGMESSAGE0#");
+
+ } else {
+ token = responseStruct.token;
+ }
+
+ /* cfhttp.FileContent returns token and other response value from the server.
+ We need to pass token as parameter to destination URL which redirect to return URL
+ */
+ redirecturl = request.PayPalURL & token;
+ location(redirecturl,false);
+
+ }
+
+ catch(any e)
+ {
+ writeOutput("Error: " & e.message);
+ writeDump(responseStruct);
+ }
+
+</cfscript>
+
+<a class="home" href="index.html">Home</a>
+</body>
+</html>
+</cfoutput>
View
87 NCDevCon-Sept2011/ncdevcon/checkout01/checkout03.cfm
@@ -0,0 +1,87 @@
+<!--
+*************************************************
+GetExpressCheckoutDetails.cfm
+
+This page shows shipping details coming from the server's response object. When click the submit button
+token, payerid, amount, currency and other necessary information passed into DoExpressChekoutpayment.cfm.
+
+*************************************************
+-->
+<cfscript>
+ responseStruct = "";
+ try {
+
+ // create our objects to call methods on
+ caller = createObject("CallerService");
+ display = createObject("DisplayService");
+ ec = createObject("ExpressCheckout");
+
+ data = StructNew();
+ data.method = "GetExpressCheckoutDetails";
+ data.token = url.token;
+
+ requestData = ec.setGetCheckoutData(request,data);
+
+ response = caller.doHttppost(requestData);
+
+ responseStruct = StructNew();
+ responseStruct = caller.getNVPResponse(#URLDecode(response)#);
+
+ if (not StructKeyExists(responseStruct, "SHIPTOSTREET2"))
+ {
+ responseStruct.SHIPTOSTREET2 = "";
+ }
+ }
+
+ catch(any e)
+ {
+ writeOutput("Error: " & e.message);
+ writeDump(responseStruct);
+ abort;
+ }
+</cfscript>
+
+<cfoutput>
+<head>
+<title>PayPal CF SDK - ExpressCheckout API</title>
+<link href="css/sdk.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+
+
+ <form action="checkout04.cfm" method="post">
+ <cfif responseStruct.Ack is "Success">
+ <input type="hidden" name="totalAmt" value="#URL.AMT#">
+ <input type="hidden" name="payerId" value="#URL.payerId#">
+ <input type="hidden" name="token" value="#URL.token#">
+ <input type="hidden" name="amt" value="#URL.AMT#">
+
+ <center>
+ <b>Review Order</b>
+ <br>
+ <b>DoExpressCheckoutPayment</b>
+ <br><br>
+ <input type="submit" value="Pay" />
+ <br><br>
+ <cfscript>
+ writeOutput(display.displayText(responseStruct));
+ </cfscript>
+
+ </cfif>
+
+ <cfif responseStruct.Ack is "Failure">
+ <center>
+ <b>Error!</b>
+ <br>
+ <cfscript>
+ writeOutput(display.displayText(responseStruct));
+ </cfscript>
+ </cfif>
+
+
+ </form>
+<a class="home" id="CallsLink" href="index.html">Home</a>
+</body>
+</html>
+</cfoutput>
View
75 NCDevCon-Sept2011/ncdevcon/checkout01/checkout04.cfm
@@ -0,0 +1,75 @@
+<!--
+*************************************************
+DoExpressCheckoutPayment.cfm
+
+This page takes necessary parameter from GetExpressCheckoutDetails page
+and pssing into doHttppost function to perform doExpressCheckout
+This page will show the response value coming from the Server. If any error occurs,
+the page will redirect to APIError.cfm to show exact error details
+
+*************************************************
+-->
+<cfscript>
+ responseStruct = StructNew();
+
+ try {
+
+ // create our objects to call methods on
+ caller = createObject("CallerService");
+ display = createObject("DisplayService");
+ ec = createObject("ExpressCheckout");
+
+
+ data = StructNew();
+ data.method = "DoExpressCheckoutPayment";
+ data.paymentAction = "sale";
+
+ requestData = ec.setDoCheckoutData(form,request,data);
+ response = caller.doHttppost(requestData);
+ responseStruct = caller.getNVPResponse(#URLDecode(response)#);
+
+ }
+
+ catch(any e)
+ {
+ writeOutput("Error: " & e.message);
+ writeDump(responseStruct);
+ abort;
+ }
+</cfscript>
+
+<cfoutput>
+<head>
+ <title>PayPal CF SDK - DoExpressCheckoutPayment API</title>
+ <link href="css/sdk.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+
+ <cfif responseStruct.Ack is "Success">
+ <center>
+ <br>
+ <center>
+ <font size=2 color=black face=Verdana><b>DoExpressCheckoutPayment</b></font>
+ <br><br>
+ <b>Thank you for your payment!</b><br><br>
+ <div class="api">
+ <cfscript>
+ writeOutput(display.displayText(responseStruct));
+ </cfscript>
+ </div>
+ </center>
+ </cfif>
+ <cfif responseStruct.Ack is "Failure">
+ <center>
+ <b>Error!</b>
+ <br>
+ <cfscript>
+ writeOutput(display.displayText(responseStruct));
+ </cfscript>
+ </center>
+ </cfif>
+
+</cfoutput>
+<a class="home" id="CallsLink" href="../index.html">Home</a>
+</body>
+</html>
View
174 NCDevCon-Sept2011/ncdevcon/checkout01/css/sdk.css
@@ -0,0 +1,174 @@
+body
+{
+ font-size:small;
+ font-family:Verdana;
+ color:Black;
+}
+
+a
+{
+ color:Blue;
+}
+
+#calls
+{
+ font-family:Verdana;
+ width:500px;
+}
+
+#calls th
+{
+ padding:10px;
+}
+
+table
+{
+ font-size:x-small;
+}
+
+td.header
+{
+ text-align:right;
+ font-size:x-small;
+ color:Black;
+ font-family:Verdana;
+ font-weight:bold;
+}
+
+#normalBold
+{
+ color:Black;
+ font-family:Verdana;
+ font-weight:bold;
+}
+
+.smaller
+{
+ font-size:smaller;
+}
+
+#normal
+{
+ color:Black;
+ font-size:small;
+ font-family:Verdana;
+}
+
+#redBold
+{
+ color:Red;
+ font-size:small;
+ font-family:Verdana;
+ font-weight:bold;
+}
+
+#apiheader
+{
+ text-align:center;
+ font-weight:bold;
+ font-size:larger;
+ font-family:Verdana;
+}
+
+table.api
+{
+ width:600;
+}
+
+a.home
+{
+ font-weight:bold;
+}
+
+td.field
+{
+ text-align:right;
+ font-size:x-small;
+ font-family:Verdana;
+
+}
+
+div.key {
+ float:left;
+ width:400px;
+ display:block;
+ text-align:right;
+ padding-right:10px;
+}
+
+div.value {
+ float:left;
+ width:400px;
+ display:block;
+ text-align:left;
+}
+
+div.clear {
+ clear:both;
+}
+
+div.displayText {
+ width:850px;
+ border:1px solid #333;
+}
+
+
+form fieldset {
+ margin-bottom: 10px;
+}
+form legend {
+ padding: 0 2px;
+ font-weight: bold;
+}
+form label {
+ display: inline-block;
+ line-height: 1.8;
+ vertical-align: top;
+}
+form fieldset ol {
+ margin: 0;
+ padding: 0;
+}
+form fieldset li {
+ list-style: none;
+ padding: 5px;
+ margin: 0;
+}
+form em {
+ font-weight: bold;
+ font-style: normal;
+ color: #f00;
+}
+form label {
+ width: 150px;
+ text-align:right /* Width of labels */
+}
+
+.tHeader {
+ width:150px;
+ float:left;
+}
+
+.tRow {
+ border:1px solid #ccc; clear:both; height:40px;
+}
+
+
+
+div fieldset {
+ margin-bottom: 10px;
+}
+
+div label {
+ display: inline-block;
+ line-height: 1.8;
+}
+div fieldset ol {
+ margin: 0;
+ padding: 0;
+}
+div fieldset li {
+ list-style: none;
+ padding: 5px;
+ margin: 0;
+}
View
BIN  NCDevCon-Sept2011/ncdevcon/checkout01/images/horse.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
23 NCDevCon-Sept2011/ncdevcon/checkout01/index.cfm
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html >
+<head>
+<meta charset=UTF-8 />
+<title>Express Checkout Step 1</title>
+</head>
+<body>
+
+<form action="checkout02.cfm" method="post">
+
+<div style="float:left;">
+<img src="images/horse.jpg" height="150px" align="right"/>
+</div>
+
+<div style="float:left; width:300px; font-family:Verdana, Geneva, sans-serif;font-size:12px;">
+From the original My Pillow Pets, this Extra Cuddly brown horse is made of soft plush fabric. Open the velcro closure and use as a pillow. Close the velcro closure and you have the softest pet ever. This is part of the Original My Pillow Pets, as advertised on Nickelodeon, Discovery Kids, TV Land.</div>
+<div style="clear:both;">&nbsp;</div>
+<input type="submit" value="Buy It Now" />
+
+</form>
+
+</body>
+</html>
View
139 NCDevCon-Sept2011/ncdevcon/checkout02/Application.cfc
@@ -0,0 +1,139 @@
+<cfscript>
+/**
+@dateCreated "July 18, 2011"
+@hint "You implement methods in Application.cfc to handle ColdFusion application events and set variables in the CFC to configure application characteristics."
+*/
+
+
+component output="false" {
+
+ /* **************************** APPLICATION VARIABLES **************************** */
+ THIS.name = "NCDevConCheckout02";
+ THIS.applicationTimeout = createTimeSpan(0, 2, 0, 0);
+
+
+ customtagpaths = "#getDirectoryFromPath(ExpandPath('../lib/'))#";
+ THIS.customTagPaths = customtagpaths;
+
+ THIS.serverSideFormValidation = true;
+ THIS.sessionManagement = true;
+ THIS.sessionTimeout = createTimeSpan(0, 0, 30, 0);
+
+ THIS.setClientCookies = true;
+ THIS.setDomainCookies = false;
+
+ THIS.scriptProtect = true;
+ THIS.secureJSON = false;
+ THIS.secureJSONPrefix = "";
+
+
+ THIS.enablerobustexception = true;
+
+
+/* **************************** APPLICATION METHODS **************************** */
+
+ public void function onApplicationEnd(struct ApplicationScope=structNew()) {
+
+ return;
+ }
+
+
+ public boolean function onApplicationStart() {
+
+ return true;
+ }
+
+ public void function onCFCRequest(required string cfcname, required string method, required string args) {
+
+ return;
+ }
+
+
+ public void function onRequestEnd() {
+
+ return;
+ }
+
+
+ public boolean function onRequestStart(required string TargetPage) {
+
+ request.serverURL = "https://api-3t.sandbox.paypal.com/nvp";
+
+ /* SUBJECT to be uncommented for UNIPAY all the other credentials like API username,
+ password,signature can be commented for UNIPAY
+ To enable Payments for Third Party Email whcih will be passed along with Partner's 3token credentials
+ uncomment both subject and 3 token credentials.
+ */
+
+
+ //request.SUBJECT="sidney@x.com";
+
+ APIuserName = "sidney_1311957058_biz_api1.x.com";
+ APIPassword = "1311957099";
+ APISignature = "AsWOI0XsYOW6SY4-RFW6nmQX9L2GAx2Dvzlusmnc2lLkNlYS6cilwiEc";
+
+ //condition to check if it is UNIPAY
+ if (isdefined("SUBJECT") && (isdefined("APIuserName") eq "false" && isdefined("APIPassword") eq "false" && isdefined("APISignature") eq "false") )
+ {
+ request.UNIPAYSUBJECT="#SUBJECT#";
+ request.USER = "";
+ request.PWD = "";
+ request.SIGNATURE = "";
+ }
+
+
+
+ //condition to check if it is Payments for Third Party Email
+ if (isdefined("SUBJECT") && isdefined("APIuserName") && isdefined("APIPassword") && isdefined("APISignature"))
+ {
+ request.UNIPAYSUBJECT="#SUBJECT#";
+ request.USER = "#APIuserName#";
+ request.PWD = "#APIPassword#";
+ request.SIGNATURE = "#APISignature#";
+ }
+
+
+ //condition to check if it is 3 token credentials
+ if (isdefined("SUBJECT") eq "false" && isdefined("APIuserName") && isdefined("APIPassword") && isdefined("APISignature") )
+ {
+ request.UNIPAYSUBJECT="";
+ request.USER = "#APIuserName#";
+ request.PWD = "#APIPassword#";
+ request.SIGNATURE = "#APISignature#";
+ }
+
+
+ request.PayPalURL = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout-mobile&useraction=commit&token=";
+ request.version = "78";
+
+ /*
+ By default the API requests doesn't go through proxy. To route the requests through a proxy server
+ set "useProxy" value as "true" and set values for proxyName and proxyPort. Set proxyName with
+ the Host Name or the IP address of the proxy server. proxyPort should be a valid port number.
+ eg:
+ useProxy = "true";
+ proxyName = "127.0.0.1";
+ proxyPort = "8081";
+ */
+
+ request.useProxy = "false";
+ request.proxyName = "";
+ request.proxyPort = "";
+
+ return true;
+ }
+
+
+ public void function onSessionEnd(required struct SessionScope, struct ApplicationScope=structNew()) {
+
+ return;
+ }
+
+
+ public void function onSessionStart() {
+
+ return;
+ }
+
+}
+</cfscript>
View
BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/ajax-loader.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icon-search-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icons-18-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icons-18-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icons-36-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/images/icons-36-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
1,643 NCDevCon-Sept2011/ncdevcon/checkout02/assets/css/jquery.mobile-1.0b2.css
@@ -0,0 +1,1643 @@
+/*!
+ * jQuery Mobile v1.0b2
+ * http://jquerymobile.com/
+ *
+ * Copyright 2010, jQuery Project
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+*/
+
+
+
+
+
+/* A
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-bar-a {
+ border: 1px solid #2A2A2A;
+ background: #111111;
+ color: #ffffff;
+ font-weight: bold;
+ text-shadow: 0 -1px 1px #000000;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#111)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #3c3c3c, #111); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #3c3c3c, #111); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #3c3c3c, #111); /* IE10 */
+ background-image: -o-linear-gradient(top, #3c3c3c, #111); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #3c3c3c, #111);
+}
+.ui-bar-a,
+.ui-bar-a input,
+.ui-bar-a select,
+.ui-bar-a textarea,
+.ui-bar-a button {
+ font-family: Helvetica, Arial, sans-serif;
+}
+.ui-bar-a .ui-link-inherit {
+ color: #fff;
+}
+.ui-bar-a .ui-link {
+ color: #7cc4e7;
+ font-weight: bold;
+}
+.ui-body-a {
+ border: 1px solid #2A2A2A;
+ background: #222222;
+ color: #fff;
+ text-shadow: 0 1px 0 #000;
+ font-weight: normal;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#666), to(#222)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #666, #222); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #666, #222); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #666, #222); /* IE10 */
+ background-image: -o-linear-gradient(top, #666, #222); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #666, #222);
+}
+.ui-body-a,
+.ui-body-a input,
+.ui-body-a select,
+.ui-body-a textarea,
+.ui-body-a button {
+ font-family: Helvetica, Arial, sans-serif;
+}
+.ui-body-a .ui-link-inherit {
+ color: #fff;
+}
+.ui-body-a .ui-link {
+ color: #2489CE;
+ font-weight: bold;
+}
+.ui-br {
+ border-bottom: rgb(130,130,130);
+ border-bottom: rgba(130,130,130,.3);
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+.ui-btn-up-a {
+ border: 1px solid #222;
+ background: #333333;
+ font-weight: bold;
+ color: #fff;
+ text-shadow: 0 -1px 1px #000;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#555), to(#333)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #555, #333); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #555, #333); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #555, #333); /* IE10 */
+ background-image: -o-linear-gradient(top, #555, #333); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #555, #333);
+}
+.ui-btn-up-a a.ui-link-inherit {
+ color: #fff;
+}
+.ui-btn-hover-a {
+ border: 1px solid #000;
+ background: #444444;
+ font-weight: bold;
+ color: #fff;
+ text-shadow: 0 -1px 1px #000;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#666), to(#444)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #666, #444); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #666, #444); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #666, #444); /* IE10 */
+ background-image: -o-linear-gradient(top, #666, #444); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #666, #444);
+}
+.ui-btn-hover-a a.ui-link-inherit {
+ color: #fff;
+}
+.ui-btn-down-a {
+ border: 1px solid #000;
+ background: #3d3d3d;
+ font-weight: bold;
+ color: #fff;
+ text-shadow: 0 -1px 1px #000;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#333), to(#5a5a5a)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #333, #5a5a5a); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #333, #5a5a5a); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #333, #5a5a5a); /* IE10 */
+ background-image: -o-linear-gradient(top, #333, #5a5a5a); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #333, #5a5a5a);
+}
+.ui-btn-down-a a.ui-link-inherit {
+ color: #fff;
+}
+.ui-btn-up-a,
+.ui-btn-hover-a,
+.ui-btn-down-a {
+ font-family: Helvetica, Arial, sans-serif;
+ text-decoration: none;
+}
+
+
+/* B
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-bar-b {
+ border: 1px solid #456f9a;
+ background: #5e87b0;
+ color: #fff;
+ font-weight: bold;
+ text-shadow: 0 -1px 1px #254f7a;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#81a8ce), to(#5e87b0)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #81a8ce, #5e87b0); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #81a8ce, #5e87b0); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #81a8ce, #5e87b0); /* IE10 */
+ background-image: -o-linear-gradient(top, #81a8ce, #5e87b0); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #81a8ce, #5e87b0);
+}
+.ui-bar-b,
+.ui-bar-b input,
+.ui-bar-b select,
+.ui-bar-b textarea,
+.ui-bar-b button {
+ font-family: Helvetica, Arial, sans-serif;
+}
+.ui-bar-b .ui-link-inherit {
+ color: #fff;
+}
+.ui-bar-b .ui-link {
+ color: #7cc4e7;
+ font-weight: bold;
+}
+
+.ui-body-b {
+ border: 1px solid #C6C6C6;
+ background: #cccccc;
+ color: #333333;
+ text-shadow: 0 1px 0 #fff;
+ font-weight: normal;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#e6e6e6), to(#ccc)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #e6e6e6, #ccc); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #e6e6e6, #ccc); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #e6e6e6, #ccc); /* IE10 */
+ background-image: -o-linear-gradient(top, #e6e6e6, #ccc); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #e6e6e6, #ccc);
+}
+.ui-body-b,
+.ui-body-b input,
+.ui-body-b select,
+.ui-body-b textarea,
+.ui-body-b button {
+ font-family: Helvetica, Arial, sans-serif;
+}
+.ui-body-b .ui-link-inherit {
+ color: #333333;
+}
+.ui-body-b .ui-link {
+ color: #2489CE;
+ font-weight: bold;
+}
+.ui-btn-up-b {
+ border: 1px solid #145072;
+ background: #2567ab;
+ font-weight: bold;
+ color: #fff;
+ text-shadow: 0 -1px 1px #145072;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#5f9cc5), to(#396b9e)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #5f9cc5, #396b9e); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #5f9cc5, #396b9e); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #5f9cc5, #396b9e); /* IE10 */
+ background-image: -o-linear-gradient(top, #5f9cc5, #396b9e); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #5f9cc5, #396b9e);
+}
+.ui-btn-up-b a.ui-link-inherit {
+ color: #fff;
+}
+.ui-btn-hover-b {
+ border: 1px solid #00516e;
+ background: #4b88b6;
+ font-weight: bold;
+ color: #fff;
+ text-shadow: 0 -1px 1px #014D68;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#72b0d4), to(#4b88b6)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #72b0d4, #4b88b6); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #72b0d4, #4b88b6); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #72b0d4, #4b88b6); /* IE10 */
+ background-image: -o-linear-gradient(top, #72b0d4, #4b88b6); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #72b0d4, #4b88b6);
+}
+.ui-btn-hover-b a.ui-link-inherit {
+ color: #fff;
+}
+.ui-btn-down-b {
+ border: 1px solid #225377;
+ background: #4e89c5;
+ font-weight: bold;
+ color: #fff;
+ text-shadow: 0 -1px 1px #225377;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#396b9e), to(#4e89c5)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #396b9e, #4e89c5); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #396b9e, #4e89c5); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #396b9e, #4e89c5); /* IE10 */
+ background-image: -o-linear-gradient(top, #396b9e, #4e89c5); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #396b9e, #4e89c5);
+}
+.ui-btn-down-b a.ui-link-inherit {
+ color: #fff;
+}
+.ui-btn-up-b,
+.ui-btn-hover-b,
+.ui-btn-down-b {
+ font-family: Helvetica, Arial, sans-serif;
+ text-decoration: none;
+}
+
+
+/* C
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-bar-c {
+ border: 1px solid #B3B3B3;
+ background: #e9eaeb;
+ color: #3E3E3E;
+ font-weight: bold;
+ text-shadow: 0 1px 1px #fff;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#e9eaeb)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #f0f0f0, #e9eaeb); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #f0f0f0, #e9eaeb); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #f0f0f0, #e9eaeb); /* IE10 */
+ background-image: -o-linear-gradient(top, #f0f0f0, #e9eaeb); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #f0f0f0, #e9eaeb);
+}
+.ui-bar-c,
+.ui-bar-c input,
+.ui-bar-c select,
+.ui-bar-c textarea,
+.ui-bar-c button {
+ font-family: Helvetica, Arial, sans-serif;
+}
+.ui-body-c {
+ border: 1px solid #B3B3B3;
+ color: #333333;
+ text-shadow: 0 1px 0 #fff;
+ background: #f0f0f0;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ddd)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, #eee, #ddd); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient(top, #eee, #ddd); /* FF3.6 */
+ background-image: -ms-linear-gradient(top, #eee, #ddd); /* IE10 */
+ background-image: -o-linear-gradient(top, #eee, #ddd); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #eee, #ddd);
+}
+.ui-body-c,
+.ui-body-c input,
+.ui-body-c select,
+.ui-body-c textarea,
+.ui-body-c button {
+ font-family: Helvetica, Arial, sans-serif;
+}