From: Laury GvR Date: Mon, 17 Nov 2014 20:55:54 +0000 (-0500) Subject: More refactoring primarily X-Git-Tag: v1.0^2~6 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=88950ca12234f4cd4f48a62210cd31995e0302fb;p=WP-Plugins%2FGlmPayments.git More refactoring primarily --- diff --git a/css/glm-donate-admin.css b/css/glm-donate-admin.css deleted file mode 100755 index fb7d0b1..0000000 --- a/css/glm-donate-admin.css +++ /dev/null @@ -1,302 +0,0 @@ -/* -* glm-payments - Default Stylesheet -*/ - -h1.donate-title { - color:#ddd; - margin-bottom:20px; -} - -#glm-payments-tab-settings th { - width:280px; -} - -#glm-payments-tab-settings ul { - padding-left:20px; -} - -#glm-payments-tab-settings li { - list-style: disc; - list-style-type:none; -} - -/* jQuery Tabs */ - -ul#glm-payments-tabs-nav { - position:relative; - margin-bottom:10px; - height:41px; - overflow:visible; - border-bottom:1px solid #ddd -} - -ul#glm-payments-tabs-nav li { - text-align:center; - position:relative; - display:block; - float:left; - width:130px; - height:40px; - margin:0 10px 0 2px; - border-top:1px solid #cccccc; - border-left:1px solid #cccccc; - border-right:1px solid #cccccc; - background: #f2f2f2; - overflow:visible; - -moz-border-radius-topleft: 7px; - -moz-border-radius-topright: 0px; - -webkit-border-radius: 7px 7px 0px 0px; - border-radius: 7px 7px 0px 0px; - opacity:0.8; -} - -ul#glm-payments-tabs-nav li.ui-state-active, -ul#glm-payments-tabs-nav li:hover { - background: #fff; - opacity:1; -} - -ul#glm-payments-tabs-nav li.ui-state-active a:before, -ul#glm-payments-tabs-nav li:hover a:before { - position: absolute; - content: " "; - top:0; - bottom:-1px; - left:0; - right:0; - border-bottom:1px solid #fff; - z-index:200; -} - -ul#glm-payments-tabs-nav li a { - position:absolute; - top:0; - left:0; - color:#777; - display:block; - padding:10px 15px; - height:20px; - line-height:20px; - width:100px; - text-decoration: none; - text-shadow: 0 1px 1px rgba(255,255,255,0.8); - text-transform:uppercase; - overflow:visible; -} - -ul#glm-payments-tabs-nav li.ui-state-active { - background: #fff; -} - -ul#glm-payments-tabs-nav li.ui-state-active a { - color:#555; -} - -/* Transactions Table */ - -table.glm-payments-projects, -table.glm-payments-transactions { - margin-top:20px; - border-spacing: 0px; - width:95%; -} - -table.glm-payments-projects thead, -table.glm-payments-transactions thead { - position:relative; - background-color:#f2f2f2; -} - -table.glm-payments-projects tr.glm-payments-absolute, -table.glm-payments-transactions tr.glm-payments-absolute { - position:absolute; - z-index:0; - width:95%; - height:38px; -} - -table.glm-payments-projects tr.glm-payments-absolute:before, -table.glm-payments-transactions tr.glm-payments-absolute:before { - content: ''; - position:absolute; - z-index:2; - display:block; - top:1px; - left:0; - bottom:1px; - right:0; - -webkit-border-radius: 7px; - -moz-border-radius: 7px; - border-radius: 7px; - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.15),inset 0px 2px 3px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.15),inset 0px 2px 3px 1px rgba(0, 0, 0, 0.1); - box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.15),inset 0px 2px 3px 1px rgba(0, 0, 0, 0.1); -} - -table.glm-payments-projects th, -table.glm-payments-transactions th { - border-top: 1px solid #fff; - border-bottom: 1px solid #ddd; -} - -table.glm-payments-projects th, -table.glm-payments-transactions th { - text-align:left; - color:#777; - text-shadow: 0 1px 0px #ffffff; -} - - -table.glm-payments-transactions td img.avatar { - float:left; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -table.glm-payments-transactions td span.donate-name { - line-height:30px; - padding-left:15px; -} - -table.glm-payments-transactions td.donate-comment { - font-style:italic; - font-family:serif; - color:#777; - font-size:14px; - line-height:14px; -} - -table.glm-payments-transactions span.donate-netamount { - color:#07DE00; - font-weight:bold; - font-size:14px; -} - -table.glm-payments-projects th:first-child, -table.glm-payments-transactions th:first-child { - -moz-border-radius-topleft: 7px; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0px; - -moz-border-radius-bottomleft: 7px; - -webkit-border-radius: 7px 0px 0px 7px; - border-radius: 7px 0px 0px 7px; -} - -table.glm-payments-projects th:last-child, -table.glm-payments-transactions th:last-child { - -moz-border-radius-topleft: 0px; - -moz-border-radius-topright: 7px; - -moz-border-radius-bottomright: 7px; - -moz-border-radius-bottomleft: 0px; - -webkit-border-radius: 0px 7px 7px 0px; - border-radius: 0px 7px 7px 0px; -} - -table.glm-payments-projects tr td, -table.glm-payments-transactions tr td { - border-bottom: 1px solid #ddd; -} - -table.glm-payments-projects tr th, -table.glm-payments-projects tr td, -table.glm-payments-transactions tr th, -table.glm-payments-transactions tr td { - padding: 10px 15px; -} - -.dot-donate-live { - margin-right:10px; - position:relative; - top:2px; - display:inline-block; - background:#07DE00; - width:12px; - height:12px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); - -moz-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); - box-shadow: inset 0px 5px 3px 1px rgba(255, 255, 255, 0.2); -} - -.dot-donate-public { - margin-right:10px; - position:relative; - top:2px; - display:inline-block; - background:#0068DE; - width:12px; - height:12px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); - -moz-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); - box-shadow: inset 0px 5px 3px 1px rgba(255, 255, 255, 0.2); -} - -.dot-donate-test { - margin-right:10px; - position:relative; - top:2px; - display:inline-block; - background:#ddd; - width:12px; - height:12px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: inset 0px 2px 2px 1px rgba(0,0,0, 0.1); - -moz-box-shadow: inset 0px 2px 2px 1px rgba(0,0,0, 0.1); - box-shadow: inset 0px 2px 3px 1px rgba(0,0,0, 0.1); -} - -.progress-donate-wrap { - position:relative; - display:block; - background:#ddd; - width:100px; - height:16px; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - border-radius: 8px; - -webkit-box-shadow: inset 0px 2px 2px 1px rgba(0,0,0, 0.1); - -moz-box-shadow: inset 0px 2px 2px 1px rgba(0,0,0, 0.1); - box-shadow: inset 0px 2px 3px 1px rgba(0,0,0, 0.1); -} - -.progress-donate-value { - margin-right:10px; - position:absolute; - z-index:50; - top:2px; - left:2px; - display:block; - background:#0068DE; - height:12px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); - -moz-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); - box-shadow: inset 0px 5px 3px 1px rgba(255, 255, 255, 0.2); -} - -#glm-payments-tab-transactions form.pagination { - display:inline; - float:left; - margin:10px 10px 0 0; -} - -.glm-payments-absolute -{ -background:linear-gradient(to top, #373737 0px, #464646 5px) repeat scroll 0 0 #464646; -color:#ffffff; -} - -.required { - color: red; - padding-left: 5px; -} diff --git a/css/glm-donate-display.css b/css/glm-donate-display.css deleted file mode 100755 index cebeffb..0000000 --- a/css/glm-donate-display.css +++ /dev/null @@ -1,351 +0,0 @@ -/* -* glm-payments - Default Stylesheet -*/ - -#glm-payments-wrap { - display:block; - padding:10px; - margin:0px; - width: 400px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; -} - -/* Payment Form Link */ - -#glm-payments-modal-button { - margin:20px 0; - padding: 8px 15px; - min-width:100px; - display:inline-block; - text-align:center; - font-weight: bold; - font-size: 12px; - background: #1275FF; - border: 1px solid #155FB0; - color: white; - text-decoration: none; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-image: -webkit-gradient(linear, left top, left bottom, from(#77B7FF), to(#017AFF)); - background-image: -moz-linear-gradient(top, #77B7FF, #017AFF); - background-image: -o-linear-gradient(top, #77B7FF, #017AFF); - -webkit-box-shadow: inset 0 1px 0 #98c9ff; - -moz-box-shadow: inset 0 1px 0 #98c9ff; - box-shadow: inset 0 1px 0 #98c9ff; - -o-border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - cursor: pointer; cursor: hand; -} - -#glm-payments-types { - display:block; - width:256px; - height:18px; - background: url('../images/types.png') no-repeat top left; - margin-bottom:20px; -} - -/* Payment Form Elements */ - -form#glm-payments-payment-form { - display:block; -} - -.donate-row-right, -.donate-row-left{width:50%;} - -form#glm-payments-payment-form h2.donate-header { - padding:10px; - color:#fff; - font-size:14px; - font-weight:bold; - text-shadow: 0 -1px 1px rgba(0,0,0,0.3); - border-top:1px solid #268DFC; - border-bottom:1px solid #004EA2; - background:#0068DE; - margin-bottom:10px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-topright: 5px; - -moz-border-radius-bottomright: 0px; - -moz-border-radius-bottomleft: 0px; - -webkit-border-radius: 5px 5px 0px 0px; - border-radius: 5px 5px 0px 0px; -} - -form#glm-payments-payment-form p.donate-display-comment { - margin:3px 0; - font-size:12px; - color:#777; -} - -form#glm-payments-payment-form label { - letter-spacing:1px; - text-transform:uppercase; -} - -form#glm-payments-payment-form .donate-row { - overflow:visible; - clear:both; - padding:5px 10px; -} - -form#glm-payments-payment-form .donate-row-left, -form#glm-payments-payment-form .donate-row-right { - float:left; - overflow:auto; -} - -form#glm-payments-payment-form .donate-submit-button { - position:relative; - margin:10px; - padding: 8px 15px; - display:block; - font-weight: bold; - font-size: 12px; - background: #1275FF; - border: 1px solid #155FB0; - color: white; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-image: -webkit-gradient(linear, left top, left bottom, from(#77B7FF), to(#017AFF)); - background-image: -moz-linear-gradient(top, #77B7FF, #017AFF); - background-image: -o-linear-gradient(top, #77B7FF, #017AFF); - -webkit-box-shadow: inset 0 1px 0 #98c9ff; - -moz-box-shadow: inset 0 1px 0 #98c9ff; - box-shadow: inset 0 1px 0 #98c9ff; - -o-border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - cursor: pointer; cursor: hand; -} - -.donate-spinner { - display:none; - margin:10px; - padding: 8px 15px; - height:15px; - width:70px; - content:" "; - background: url('../images/spinner.gif') no-repeat 50% 50%; - border: 1px solid #afd5ff; - -o-border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; -} - -.donate-valid { - color: #638731 !important; - background-color:#d9fba8 !important; -} - -.donate-invalid { - color:#873d31 !important; - background-color:#fbbcb1 !important; -} - -.glm-payments-poweredby { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; - color:#777; - font-size:10px; - padding:0 20px; -} - -.glm-payments-poweredby a { - color:#0068DE; - text-decoration: none; -} - -/* Response Styling */ - -.glm-payments-notification { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 12px; - width:360px; - padding:10px; - margin:10px 0 10px 10px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.glm-payments-currency { - text-transform: uppercase; -} - -.glm-payments-success { - color:#345607; - background-color:#D1F2A5; - text-shadow:0 1px 1px rgba(255,255,255,0.2); -} - -.glm-payments-failure { - color:#4E1E0F; - background-color:#FF9F80; - text-shadow:0 1px 1px rgba(255,255,255,0.1); -} - -/* Form Styling */ - - -form#glm-payments-payment-form .glm-payments-details label { - color:#777; -} - -form#glm-payments-payment-form .glm-payments-card label { - color:#0068DE; -} - -form#glm-payments-payment-form .glm-payments-card input { - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -form#glm-payments-payment-form .glm-payments-card input.card-cvc { - width:120px; -} - -form#glm-payments-payment-form label, -form#glm-payments-payment-form input, -form#glm-payments-payment-form select, -form#glm-payments-payment-form textarea { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; - font-size: 14px !important; - font-weight: normal; - line-height: normal; - margin-bottom: 3px !important; -} -form#glm-payments-payment-form textarea, -form#glm-payments-payment-form input { - position:relative; - width:338px; - background-color:#fff; -} - -input.glm-payments-name {background: url('../images/h-name.png') no-repeat 8px 8px;} -input.glm-payments-email {background: url('../images/h-email.png') no-repeat 8px 10px;} -textarea.glm-payments-comment {background: url('../images/h-comment.png') no-repeat 8px 10px;} -input.glm-payments-card-amount {background: url('../images/h-amount.png') no-repeat 8px 8px;} -input.card-number {background: url('../images/h-card.png') no-repeat 8px 10px;} -input.card-cvc {background: url('../images/h-cvc.png') no-repeat 8px 10px;} - -form#glm-payments-payment-form select { - cursor: pointer; -} - -input[type=checkbox], input[type=radio] { - cursor: pointer; -} - -.donate-expiry { - font-size:12px; - letter-spacing:1px; - color:#bbb; - text-shadow:0 1px 0 #fff; -} - -form#glm-payments-payment-form select { - margin-top:0px !important; - display:block; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - padding: 2px 7px 2px 7px !important; - height: auto !important; - text-shadow: 0 1px 0 white; - background-image: -webkit-gradient(linear, left top, left bottom, from(#F9F9F9), to(#E8E8E8)); - background-image: -moz-linear-gradient(top, #F9F9F9, #E8E8E8); - background-image: -o-linear-gradient(top, #F9F9F9, #E8E8E8); - -webkit-box-shadow: inset 0 1px 0 white; - -moz-box-shadow: inset 0 1px 0 white; - box-shadow: inset 0 1px 0 white; -} - -form#glm-payments-payment-form select:hover { - background-image: -webkit-gradient(linear, left top, left bottom, from(#E8E8E8), to(#F9F9F9)); - background-image: -moz-linear-gradient(top, #E8E8E8, #F9F9F9); - background-image: -o-linear-gradient(top, #E8E8E8, #F9F9F9); -} - -form#glm-payments-payment-form input, -form#glm-payments-payment-form textarea, -form#glm-payments-payment-form select, -form#glm-payments-payment-form .uneditable-input { - display: inline-block; - height: 18px; - padding: 8px 8px 8px 32px; - font-size: 13px; - line-height: 18px; - color: #808080; - border: 1px solid #ccc; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -form#glm-payments-payment-form input[type=checkbox], form#glm-payments-payment-form input[type=radio] { - width: auto; - height: auto; - padding: 0; - margin: 3px 0; - *margin-top: 0; - /* IE6-7 */ - - line-height: normal; - border: none; -} - -form#glm-payments-payment-form select { - height: 27px; - line-height: 27px; -} - -form#glm-payments-payment-form input[type=button], form#glm-payments-payment-form input[type=reset], form#glm-payments-payment-form input[type=submit] { - width: auto; - height: auto; -} - -form#glm-payments-payment-form input[type=checkbox] { - position:relative; - top:2px; - margin-right:5px; -} - -form#glm-payments-payment-form select[multiple] { - height: inherit; - background-color: #ffffff; -} -form#glm-payments-payment-form textarea { - height: auto; -} - -:-moz-placeholder { - color: #bfbfbf; -} -::-webkit-input-placeholder { - color: #bfbfbf; -} -form#glm-payments-payment-form input, form#glm-payments-payment-form textarea { - -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; - -moz-transition: border linear 0.2s, box-shadow linear 0.2s; - -ms-transition: border linear 0.2s, box-shadow linear 0.2s; - -o-transition: border linear 0.2s, box-shadow linear 0.2s; - transition: border linear 0.2s, box-shadow linear 0.2s; - -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); -} -form#glm-payments-payment-form input:focus, form#glm-payments-payment-form textarea:focus { - outline: 0; - border-color: rgba(0, 104, 222, 0.8); - -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 104, 222, 0.6); - -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 104, 222, 0.6); - box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 104, 222, 0.6); -} -input[type=file]:focus, input[type=checkbox]:focus, select:focus { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - outline: 1px dotted #666; -} diff --git a/css/glm-donate-thickbox.css b/css/glm-donate-thickbox.css deleted file mode 100755 index 171f7bb..0000000 --- a/css/glm-donate-thickbox.css +++ /dev/null @@ -1,187 +0,0 @@ - -/* ----------------------------------------------------------------------------------------------------------------*/ -/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ -/* ----------------------------------------------------------------------------------------------------------------*/ -#TB_window { - font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #333333; -} - -#TB_secondLine { - font: 10px "Helvetica Neue", Helvetica, Arial, sans-serif; - color:#666666; -} - -#TB_window a:link {color: #666666;} -#TB_window a:visited {color: #666666;} -#TB_window a:hover {color: #000;} -#TB_window a:active {color: #666666;} -#TB_window a:focus{color: #666666;} - -/* ----------------------------------------------------------------------------------------------------------------*/ -/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/ -/* ----------------------------------------------------------------------------------------------------------------*/ -#TB_overlay { - position: fixed; - z-index:10000; - top: 0px; - left: 0px; - height:100%; - width:100%; -} - -.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;} -.TB_overlayBG { - background-color:#000; - -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; - filter:alpha(opacity=75); - -moz-opacity: 0.75; - opacity: 0.75; -} - -* html #TB_overlay { /* ie6 hack */ - position: absolute; - height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); -} - -#TB_window { - position: fixed; - background: #ffffff; - z-index: 10002; - color:#000000; - visibility: hidden; - text-align:left; - top:50%; - left:50%; - -moz-box-shadow: rgba(0,0,0,1) 0 4px 30px; - -webkit-box-shadow: rgba(0,0,0,1) 0 4px 30px; - -khtml-box-shadow: rgba(0,0,0,1) 0 4px 30px; - box-shadow: rgba(0,0,0,1) 0 4px 30px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - overflow:hidden !important; -} - -#TB_window iframe { - overflow:hidden !important; -} - -* html #TB_window { /* ie6 hack */ - position: absolute; - margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); -} - -#TB_window img#TB_Image { - display:block; - margin: 15px 0 0 15px; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; - border-top: 1px solid #666; - border-left: 1px solid #666; -} - -#TB_caption{ - height:25px; - padding:7px 30px 10px 25px; - float:left; -} - -#TB_closeWindow{ - height:25px; - padding:11px 25px 10px 0; - float:right; -} - -#TB_closeAjaxWindow{ - padding:6px 10px 0; - text-align:right; - float:right; -} - -#TB_ajaxWindowTitle{ - float:left; - padding:6px 10px 0; -} - -#TB_title{ - color:#fff; - font-size:14px; - font-weight:bold; - text-shadow: 0 -1px 1px rgba(0,0,0,0.3); - background: #2F7ED6; - -webkit-box-shadow: inset 0px 1px 0px 0px #75acea; - -moz-box-shadow: inset 0px 1px 0px 0px #75acea; - box-shadow: inset 0px 1px 0px 0px #75acea; - background-image: -webkit-gradient(linear, left top, left bottom, from(#60A0E7), to(#3A7AC1)); - background-image: -moz-linear-gradient(top, #60A0E7, #3A7AC1); - background-image: -o-linear-gradient(top, #60A0E7, #3A7AC1); - padding:10px; - height:27px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-topright: 5px; - -moz-border-radius-bottomright: 0px; - -moz-border-radius-bottomleft: 0px; - -webkit-border-radius: 5px 5px 0px 0px; - border-radius: 5px 5px 0px 0px; -} - -#TB_ajaxContent{ - clear:both; - padding:2px 15px 15px 15px; - overflow:auto; - text-align:left; - line-height:1.4em; -} - -#TB_ajaxContent.TB_modal{ - padding:15px; -} - -#TB_ajaxContent p{ - padding:5px 0px 5px 0px; -} - -#TB_load{ - position: fixed; - display:none; - z-index:10003; - top: 50%; - left: 50%; - background-color: #E8E8E8; - border: 1px solid #555; - margin: -45px 0pt 0pt -125px; - padding: 40px 15px 15px; -} - -* html #TB_load { /* ie6 hack */ -position: absolute; -margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); -} - -#TB_HideSelect{ - z-index:9999; - position:fixed; - top: 0; - left: 0; - background-color:#fff; - border:none; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; - height:100%; - width:100%; -} - -* html #TB_HideSelect { /* ie6 hack */ - position: absolute; - height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); -} - -#TB_iframeContent{ - clear:both; - border:none; - margin-bottom:-1px; - _margin-bottom:1px; - overflow:hidden !important; -} diff --git a/css/glm-donate-widget.css b/css/glm-donate-widget.css deleted file mode 100755 index 17f3b2a..0000000 --- a/css/glm-donate-widget.css +++ /dev/null @@ -1,62 +0,0 @@ -.glm-payments-recent { - -} - -.glm-payments-recent .donate-item { - min-height:70px; - position:relative; - margin:5px 0; -} - -.glm-payments-recent .donate-item img.avatar { - position:absolute; - top:0; - left:0; - width:50px; - height:50px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.glm-payments-recent .donate-item .donate-recent-comment { - padding-left:60px; -} - -.glm-payments-recent .donate-item .donate-recent-content:before { - content:'\2018'; -} - -.glm-payments-recent .donate-item .donate-recent-content:after { - content:'\2019'; -} - -.glm-payments-recent .donate-item .donate-recent-name { - margin: 0 0 0.5em 0; - font-weight:bold; -} - -.glm-payments-recent .donate-item .donate-recent-content { - color:#777; -} - - -.donate_btn_submit -{ -height: 28px; -float: none; -padding: 0 22px; -margin: 0 28px 0 218px; -background: #608e3a; -border: none; -line-height: 28px; -font-size: 14px; -color: #ffffff; -font-family: 'proxima-nova'; -font-weight: bold; -border-radius: 15px; --webkit-border-radius: 15px; --moz-border-radius: 15px; -} -.donate_btn_submit:hover { background:#4e7a29; } - diff --git a/css/glm-payment-admin.css b/css/glm-payment-admin.css new file mode 100755 index 0000000..2bbeb90 --- /dev/null +++ b/css/glm-payment-admin.css @@ -0,0 +1,302 @@ +/* +* glm-payments - Default Stylesheet +*/ + +h1.payment-title { + color:#ddd; + margin-bottom:20px; +} + +#glm-payments-tab-settings th { + width:280px; +} + +#glm-payments-tab-settings ul { + padding-left:20px; +} + +#glm-payments-tab-settings li { + list-style: disc; + list-style-type:none; +} + +/* jQuery Tabs */ + +ul#glm-payments-tabs-nav { + position:relative; + margin-bottom:10px; + height:41px; + overflow:visible; + border-bottom:1px solid #ddd +} + +ul#glm-payments-tabs-nav li { + text-align:center; + position:relative; + display:block; + float:left; + width:130px; + height:40px; + margin:0 10px 0 2px; + border-top:1px solid #cccccc; + border-left:1px solid #cccccc; + border-right:1px solid #cccccc; + background: #f2f2f2; + overflow:visible; + -moz-border-radius-topleft: 7px; + -moz-border-radius-topright: 0px; + -webkit-border-radius: 7px 7px 0px 0px; + border-radius: 7px 7px 0px 0px; + opacity:0.8; +} + +ul#glm-payments-tabs-nav li.ui-state-active, +ul#glm-payments-tabs-nav li:hover { + background: #fff; + opacity:1; +} + +ul#glm-payments-tabs-nav li.ui-state-active a:before, +ul#glm-payments-tabs-nav li:hover a:before { + position: absolute; + content: " "; + top:0; + bottom:-1px; + left:0; + right:0; + border-bottom:1px solid #fff; + z-index:200; +} + +ul#glm-payments-tabs-nav li a { + position:absolute; + top:0; + left:0; + color:#777; + display:block; + padding:10px 15px; + height:20px; + line-height:20px; + width:100px; + text-decoration: none; + text-shadow: 0 1px 1px rgba(255,255,255,0.8); + text-transform:uppercase; + overflow:visible; +} + +ul#glm-payments-tabs-nav li.ui-state-active { + background: #fff; +} + +ul#glm-payments-tabs-nav li.ui-state-active a { + color:#555; +} + +/* Transactions Table */ + +table.glm-payments-projects, +table.glm-payments-transactions { + margin-top:20px; + border-spacing: 0px; + width:95%; +} + +table.glm-payments-projects thead, +table.glm-payments-transactions thead { + position:relative; + background-color:#f2f2f2; +} + +table.glm-payments-projects tr.glm-payments-absolute, +table.glm-payments-transactions tr.glm-payments-absolute { + position:absolute; + z-index:0; + width:95%; + height:38px; +} + +table.glm-payments-projects tr.glm-payments-absolute:before, +table.glm-payments-transactions tr.glm-payments-absolute:before { + content: ''; + position:absolute; + z-index:2; + display:block; + top:1px; + left:0; + bottom:1px; + right:0; + -webkit-border-radius: 7px; + -moz-border-radius: 7px; + border-radius: 7px; + -webkit-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.15),inset 0px 2px 3px 1px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.15),inset 0px 2px 3px 1px rgba(0, 0, 0, 0.1); + box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.15),inset 0px 2px 3px 1px rgba(0, 0, 0, 0.1); +} + +table.glm-payments-projects th, +table.glm-payments-transactions th { + border-top: 1px solid #fff; + border-bottom: 1px solid #ddd; +} + +table.glm-payments-projects th, +table.glm-payments-transactions th { + text-align:left; + color:#777; + text-shadow: 0 1px 0px #ffffff; +} + + +table.glm-payments-transactions td img.avatar { + float:left; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +table.glm-payments-transactions td span.payment-name { + line-height:30px; + padding-left:15px; +} + +table.glm-payments-transactions td.payment-comment { + font-style:italic; + font-family:serif; + color:#777; + font-size:14px; + line-height:14px; +} + +table.glm-payments-transactions span.payment-netamount { + color:#07DE00; + font-weight:bold; + font-size:14px; +} + +table.glm-payments-projects th:first-child, +table.glm-payments-transactions th:first-child { + -moz-border-radius-topleft: 7px; + -moz-border-radius-topright: 0px; + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 7px; + -webkit-border-radius: 7px 0px 0px 7px; + border-radius: 7px 0px 0px 7px; +} + +table.glm-payments-projects th:last-child, +table.glm-payments-transactions th:last-child { + -moz-border-radius-topleft: 0px; + -moz-border-radius-topright: 7px; + -moz-border-radius-bottomright: 7px; + -moz-border-radius-bottomleft: 0px; + -webkit-border-radius: 0px 7px 7px 0px; + border-radius: 0px 7px 7px 0px; +} + +table.glm-payments-projects tr td, +table.glm-payments-transactions tr td { + border-bottom: 1px solid #ddd; +} + +table.glm-payments-projects tr th, +table.glm-payments-projects tr td, +table.glm-payments-transactions tr th, +table.glm-payments-transactions tr td { + padding: 10px 15px; +} + +.dot-payment-live { + margin-right:10px; + position:relative; + top:2px; + display:inline-block; + background:#07DE00; + width:12px; + height:12px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); + -moz-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); + box-shadow: inset 0px 5px 3px 1px rgba(255, 255, 255, 0.2); +} + +.dot-payment-public { + margin-right:10px; + position:relative; + top:2px; + display:inline-block; + background:#0068DE; + width:12px; + height:12px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); + -moz-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); + box-shadow: inset 0px 5px 3px 1px rgba(255, 255, 255, 0.2); +} + +.dot-payment-test { + margin-right:10px; + position:relative; + top:2px; + display:inline-block; + background:#ddd; + width:12px; + height:12px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: inset 0px 2px 2px 1px rgba(0,0,0, 0.1); + -moz-box-shadow: inset 0px 2px 2px 1px rgba(0,0,0, 0.1); + box-shadow: inset 0px 2px 3px 1px rgba(0,0,0, 0.1); +} + +.progress-payment-wrap { + position:relative; + display:block; + background:#ddd; + width:100px; + height:16px; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + -webkit-box-shadow: inset 0px 2px 2px 1px rgba(0,0,0, 0.1); + -moz-box-shadow: inset 0px 2px 2px 1px rgba(0,0,0, 0.1); + box-shadow: inset 0px 2px 3px 1px rgba(0,0,0, 0.1); +} + +.progress-payment-value { + margin-right:10px; + position:absolute; + z-index:50; + top:2px; + left:2px; + display:block; + background:#0068DE; + height:12px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); + -moz-box-shadow: inset 0px 3px 2px 1px rgba(255, 255, 255, 0.2); + box-shadow: inset 0px 5px 3px 1px rgba(255, 255, 255, 0.2); +} + +#glm-payments-tab-transactions form.pagination { + display:inline; + float:left; + margin:10px 10px 0 0; +} + +.glm-payments-absolute +{ +background:linear-gradient(to top, #373737 0px, #464646 5px) repeat scroll 0 0 #464646; +color:#ffffff; +} + +.required { + color: red; + padding-left: 5px; +} diff --git a/css/glm-payment-display.css b/css/glm-payment-display.css new file mode 100755 index 0000000..7335002 --- /dev/null +++ b/css/glm-payment-display.css @@ -0,0 +1,351 @@ +/* +* glm-payments - Default Stylesheet +*/ + +#glm-payments-wrap { + display:block; + padding:10px; + margin:0px; + width: 400px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; +} + +/* Payment Form Link */ + +#glm-payments-modal-button { + margin:20px 0; + padding: 8px 15px; + min-width:100px; + display:inline-block; + text-align:center; + font-weight: bold; + font-size: 12px; + background: #1275FF; + border: 1px solid #155FB0; + color: white; + text-decoration: none; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-image: -webkit-gradient(linear, left top, left bottom, from(#77B7FF), to(#017AFF)); + background-image: -moz-linear-gradient(top, #77B7FF, #017AFF); + background-image: -o-linear-gradient(top, #77B7FF, #017AFF); + -webkit-box-shadow: inset 0 1px 0 #98c9ff; + -moz-box-shadow: inset 0 1px 0 #98c9ff; + box-shadow: inset 0 1px 0 #98c9ff; + -o-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + cursor: pointer; cursor: hand; +} + +#glm-payments-types { + display:block; + width:256px; + height:18px; + background: url('../images/types.png') no-repeat top left; + margin-bottom:20px; +} + +/* Payment Form Elements */ + +form#glm-payments-payment-form { + display:block; +} + +.payment-row-right, +.payment-row-left{width:50%;} + +form#glm-payments-payment-form h2.payment-header { + padding:10px; + color:#fff; + font-size:14px; + font-weight:bold; + text-shadow: 0 -1px 1px rgba(0,0,0,0.3); + border-top:1px solid #268DFC; + border-bottom:1px solid #004EA2; + background:#0068DE; + margin-bottom:10px; + -moz-border-radius-topleft: 5px; + -moz-border-radius-topright: 5px; + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 0px; + -webkit-border-radius: 5px 5px 0px 0px; + border-radius: 5px 5px 0px 0px; +} + +form#glm-payments-payment-form p.payment-display-comment { + margin:3px 0; + font-size:12px; + color:#777; +} + +form#glm-payments-payment-form label { + letter-spacing:1px; + text-transform:uppercase; +} + +form#glm-payments-payment-form .payment-row { + overflow:visible; + clear:both; + padding:5px 10px; +} + +form#glm-payments-payment-form .payment-row-left, +form#glm-payments-payment-form .payment-row-right { + float:left; + overflow:auto; +} + +form#glm-payments-payment-form .payment-invalid-button { + position:relative; + margin:10px; + padding: 8px 15px; + display:block; + font-weight: bold; + font-size: 12px; + background: #1275FF; + border: 1px solid #155FB0; + color: white; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-image: -webkit-gradient(linear, left top, left bottom, from(#77B7FF), to(#017AFF)); + background-image: -moz-linear-gradient(top, #77B7FF, #017AFF); + background-image: -o-linear-gradient(top, #77B7FF, #017AFF); + -webkit-box-shadow: inset 0 1px 0 #98c9ff; + -moz-box-shadow: inset 0 1px 0 #98c9ff; + box-shadow: inset 0 1px 0 #98c9ff; + -o-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + cursor: pointer; cursor: hand; +} + +.payment-spinner { + display:none; + margin:10px; + padding: 8px 15px; + height:15px; + width:70px; + content:" "; + background: url('../images/spinner.gif') no-repeat 50% 50%; + border: 1px solid #afd5ff; + -o-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; +} + +.payment-valid { + color: #638731 !important; + background-color:#d9fba8 !important; +} + +.payment-invalid { + color:#873d31 !important; + background-color:#fbbcb1 !important; +} + +.glm-payments-poweredby { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; + color:#777; + font-size:10px; + padding:0 20px; +} + +.glm-payments-poweredby a { + color:#0068DE; + text-decoration: none; +} + +/* Response Styling */ + +.glm-payments-notification { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + width:360px; + padding:10px; + margin:10px 0 10px 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.glm-payments-currency { + text-transform: uppercase; +} + +.glm-payments-success { + color:#345607; + background-color:#D1F2A5; + text-shadow:0 1px 1px rgba(255,255,255,0.2); +} + +.glm-payments-failure { + color:#4E1E0F; + background-color:#FF9F80; + text-shadow:0 1px 1px rgba(255,255,255,0.1); +} + +/* Form Styling */ + + +form#glm-payments-payment-form .glm-payments-details label { + color:#777; +} + +form#glm-payments-payment-form .glm-payments-card label { + color:#0068DE; +} + +form#glm-payments-payment-form .glm-payments-card input { + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +form#glm-payments-payment-form .glm-payments-card input.card-cvc { + width:120px; +} + +form#glm-payments-payment-form label, +form#glm-payments-payment-form input, +form#glm-payments-payment-form select, +form#glm-payments-payment-form textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; + font-size: 14px !important; + font-weight: normal; + line-height: normal; + margin-bottom: 3px !important; +} +form#glm-payments-payment-form textarea, +form#glm-payments-payment-form input { + position:relative; + width:338px; + background-color:#fff; +} + +input.glm-payments-name {background: url('../images/h-name.png') no-repeat 8px 8px;} +input.glm-payments-email {background: url('../images/h-email.png') no-repeat 8px 10px;} +textarea.glm-payments-comment {background: url('../images/h-comment.png') no-repeat 8px 10px;} +input.glm-payments-card-amount {background: url('../images/h-amount.png') no-repeat 8px 8px;} +input.card-number {background: url('../images/h-card.png') no-repeat 8px 10px;} +input.card-cvc {background: url('../images/h-cvc.png') no-repeat 8px 10px;} + +form#glm-payments-payment-form select { + cursor: pointer; +} + +input[type=checkbox], input[type=radio] { + cursor: pointer; +} + +.payment-expiry { + font-size:12px; + letter-spacing:1px; + color:#bbb; + text-shadow:0 1px 0 #fff; +} + +form#glm-payments-payment-form select { + margin-top:0px !important; + display:block; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 2px 7px 2px 7px !important; + height: auto !important; + text-shadow: 0 1px 0 white; + background-image: -webkit-gradient(linear, left top, left bottom, from(#F9F9F9), to(#E8E8E8)); + background-image: -moz-linear-gradient(top, #F9F9F9, #E8E8E8); + background-image: -o-linear-gradient(top, #F9F9F9, #E8E8E8); + -webkit-box-shadow: inset 0 1px 0 white; + -moz-box-shadow: inset 0 1px 0 white; + box-shadow: inset 0 1px 0 white; +} + +form#glm-payments-payment-form select:hover { + background-image: -webkit-gradient(linear, left top, left bottom, from(#E8E8E8), to(#F9F9F9)); + background-image: -moz-linear-gradient(top, #E8E8E8, #F9F9F9); + background-image: -o-linear-gradient(top, #E8E8E8, #F9F9F9); +} + +form#glm-payments-payment-form input, +form#glm-payments-payment-form textarea, +form#glm-payments-payment-form select, +form#glm-payments-payment-form .uneditable-input { + display: inline-block; + height: 18px; + padding: 8px 8px 8px 32px; + font-size: 13px; + line-height: 18px; + color: #808080; + border: 1px solid #ccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +form#glm-payments-payment-form input[type=checkbox], form#glm-payments-payment-form input[type=radio] { + width: auto; + height: auto; + padding: 0; + margin: 3px 0; + *margin-top: 0; + /* IE6-7 */ + + line-height: normal; + border: none; +} + +form#glm-payments-payment-form select { + height: 27px; + line-height: 27px; +} + +form#glm-payments-payment-form input[type=button], form#glm-payments-payment-form input[type=reset], form#glm-payments-payment-form input[type=submit] { + width: auto; + height: auto; +} + +form#glm-payments-payment-form input[type=checkbox] { + position:relative; + top:2px; + margin-right:5px; +} + +form#glm-payments-payment-form select[multiple] { + height: inherit; + background-color: #ffffff; +} +form#glm-payments-payment-form textarea { + height: auto; +} + +:-moz-placeholder { + color: #bfbfbf; +} +::-webkit-input-placeholder { + color: #bfbfbf; +} +form#glm-payments-payment-form input, form#glm-payments-payment-form textarea { + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -ms-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); +} +form#glm-payments-payment-form input:focus, form#glm-payments-payment-form textarea:focus { + outline: 0; + border-color: rgba(0, 104, 222, 0.8); + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 104, 222, 0.6); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 104, 222, 0.6); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 104, 222, 0.6); +} +input[type=file]:focus, input[type=checkbox]:focus, select:focus { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + outline: 1px dotted #666; +} diff --git a/css/glm-payment-thickbox.css b/css/glm-payment-thickbox.css new file mode 100755 index 0000000..171f7bb --- /dev/null +++ b/css/glm-payment-thickbox.css @@ -0,0 +1,187 @@ + +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +#TB_window { + font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #333333; +} + +#TB_secondLine { + font: 10px "Helvetica Neue", Helvetica, Arial, sans-serif; + color:#666666; +} + +#TB_window a:link {color: #666666;} +#TB_window a:visited {color: #666666;} +#TB_window a:hover {color: #000;} +#TB_window a:active {color: #666666;} +#TB_window a:focus{color: #666666;} + +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +#TB_overlay { + position: fixed; + z-index:10000; + top: 0px; + left: 0px; + height:100%; + width:100%; +} + +.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;} +.TB_overlayBG { + background-color:#000; + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; + filter:alpha(opacity=75); + -moz-opacity: 0.75; + opacity: 0.75; +} + +* html #TB_overlay { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_window { + position: fixed; + background: #ffffff; + z-index: 10002; + color:#000000; + visibility: hidden; + text-align:left; + top:50%; + left:50%; + -moz-box-shadow: rgba(0,0,0,1) 0 4px 30px; + -webkit-box-shadow: rgba(0,0,0,1) 0 4px 30px; + -khtml-box-shadow: rgba(0,0,0,1) 0 4px 30px; + box-shadow: rgba(0,0,0,1) 0 4px 30px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + overflow:hidden !important; +} + +#TB_window iframe { + overflow:hidden !important; +} + +* html #TB_window { /* ie6 hack */ + position: absolute; + margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_window img#TB_Image { + display:block; + margin: 15px 0 0 15px; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + border-top: 1px solid #666; + border-left: 1px solid #666; +} + +#TB_caption{ + height:25px; + padding:7px 30px 10px 25px; + float:left; +} + +#TB_closeWindow{ + height:25px; + padding:11px 25px 10px 0; + float:right; +} + +#TB_closeAjaxWindow{ + padding:6px 10px 0; + text-align:right; + float:right; +} + +#TB_ajaxWindowTitle{ + float:left; + padding:6px 10px 0; +} + +#TB_title{ + color:#fff; + font-size:14px; + font-weight:bold; + text-shadow: 0 -1px 1px rgba(0,0,0,0.3); + background: #2F7ED6; + -webkit-box-shadow: inset 0px 1px 0px 0px #75acea; + -moz-box-shadow: inset 0px 1px 0px 0px #75acea; + box-shadow: inset 0px 1px 0px 0px #75acea; + background-image: -webkit-gradient(linear, left top, left bottom, from(#60A0E7), to(#3A7AC1)); + background-image: -moz-linear-gradient(top, #60A0E7, #3A7AC1); + background-image: -o-linear-gradient(top, #60A0E7, #3A7AC1); + padding:10px; + height:27px; + -moz-border-radius-topleft: 5px; + -moz-border-radius-topright: 5px; + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 0px; + -webkit-border-radius: 5px 5px 0px 0px; + border-radius: 5px 5px 0px 0px; +} + +#TB_ajaxContent{ + clear:both; + padding:2px 15px 15px 15px; + overflow:auto; + text-align:left; + line-height:1.4em; +} + +#TB_ajaxContent.TB_modal{ + padding:15px; +} + +#TB_ajaxContent p{ + padding:5px 0px 5px 0px; +} + +#TB_load{ + position: fixed; + display:none; + z-index:10003; + top: 50%; + left: 50%; + background-color: #E8E8E8; + border: 1px solid #555; + margin: -45px 0pt 0pt -125px; + padding: 40px 15px 15px; +} + +* html #TB_load { /* ie6 hack */ +position: absolute; +margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_HideSelect{ + z-index:9999; + position:fixed; + top: 0; + left: 0; + background-color:#fff; + border:none; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + height:100%; + width:100%; +} + +* html #TB_HideSelect { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_iframeContent{ + clear:both; + border:none; + margin-bottom:-1px; + _margin-bottom:1px; + overflow:hidden !important; +} diff --git a/css/glm-payment-widget.css b/css/glm-payment-widget.css new file mode 100755 index 0000000..6f6bae3 --- /dev/null +++ b/css/glm-payment-widget.css @@ -0,0 +1,62 @@ +.glm-payments-recent { + +} + +.glm-payments-recent .payment-item { + min-height:70px; + position:relative; + margin:5px 0; +} + +.glm-payments-recent .payment-item img.avatar { + position:absolute; + top:0; + left:0; + width:50px; + height:50px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.glm-payments-recent .payment-item .payment-recent-comment { + padding-left:60px; +} + +.glm-payments-recent .payment-item .payment-recent-content:before { + content:'\2018'; +} + +.glm-payments-recent .payment-item .payment-recent-content:after { + content:'\2019'; +} + +.glm-payments-recent .payment-item .payment-recent-name { + margin: 0 0 0.5em 0; + font-weight:bold; +} + +.glm-payments-recent .payment-item .payment-recent-content { + color:#777; +} + + +.payment_btn_submit +{ +height: 28px; +float: none; +padding: 0 22px; +margin: 0 28px 0 218px; +background: #608e3a; +border: none; +line-height: 28px; +font-size: 14px; +color: #ffffff; +font-family: 'proxima-nova'; +font-weight: bold; +border-radius: 15px; +-webkit-border-radius: 15px; +-moz-border-radius: 15px; +} +.payment_btn_submit:hover { background:#4e7a29; } + diff --git a/glm-payments.php b/glm-payments.php index 39f34e3..beeb193 100755 --- a/glm-payments.php +++ b/glm-payments.php @@ -8,47 +8,47 @@ */ session_start(); -@define ( 'WP_DONATE_VERSION', '1.5' ); -@define ( 'WP_DONATE_PATH', WP_PLUGIN_URL . '/' . end( explode( DIRECTORY_SEPARATOR, dirname( __FILE__ ) ) ) ); -include_once('includes/donate-function.php'); -include_once('includes/donate-display.php'); -include_once('includes/donate-options.php'); +@define ( 'glm_payment_VERSION', '1.5' ); +@define ( 'glm_payment_PATH', WP_PLUGIN_URL . '/' . end( explode( DIRECTORY_SEPARATOR, dirname( __FILE__ ) ) ) ); +include_once('includes/payment-function.php'); +include_once('includes/payment-display.php'); +include_once('includes/payment-options.php'); -add_action('wp_print_styles', 'load_wp_donate_css'); -add_action('wp_print_scripts', 'load_wp_donate_js'); -add_action('admin_print_styles', 'load_wp_donate_admin_css'); -add_action('admin_print_scripts', 'load_wp_donate_admin_js'); +add_action('wp_print_styles', 'load_glm_payment_css'); +add_action('wp_print_scripts', 'load_glm_payment_js'); +add_action('admin_print_styles', 'load_glm_payment_admin_css'); +add_action('admin_print_scripts', 'load_glm_payment_admin_js'); -function load_wp_donate_js() +function load_glm_payment_js() { - wp_enqueue_script( 'glm-payments-js', WP_DONATE_PATH . '/js/paymentmethods.js', array('jquery') ); + wp_enqueue_script( 'glm-payments-js', glm_payment_PATH . '/js/paymentmethods.js', array('jquery') ); } -function load_wp_donate_admin_js() +function load_glm_payment_admin_js() { wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-tabs'); } -function load_wp_donate_css() +function load_glm_payment_css() { - $options = get_option('wp_donate_options'); - if ( $options['donate_css_switch'] ) { - if ( $options['donate_css_switch'] == 'Yes') { - wp_enqueue_style('donate-payment-css', WP_DONATE_PATH . '/css/glm-payments-display.css'); + $options = get_option('glm_payment_options'); + if ( $options['payment_css_switch'] ) { + if ( $options['payment_css_switch'] == 'Yes') { + wp_enqueue_style('glm-payment-css', glm_payment_PATH . '/css/glm-payments-display.css'); } } - wp_enqueue_style('donate-widget-css', WP_DONATE_PATH . '/css/glm-payments-widget.css'); + wp_enqueue_style('payment-widget-css', glm_payment_PATH . '/css/glm-payments-widget.css'); } -function load_wp_donate_admin_css() { - wp_enqueue_style('donate-css', WP_DONATE_PATH . '/css/glm-payments-admin.css'); +function load_glm_payment_admin_css() { + wp_enqueue_style('payment-css', glm_payment_PATH . '/css/glm-payments-admin.css'); } function my_add_menu_items() { - add_menu_page( 'WP Donate', 'WP Donate', 'activate_plugins', 'wp_donate', 'my_render_list_page' ); - add_options_page( 'WP Donate', 'WP Donate', 'manage_options', 'wp_donate', 'wp_donate_options_page' ); + add_menu_page( 'GLM Payment', 'GLM Payment', 'activate_plugins', 'glm_payment', 'my_render_list_page' ); + add_options_page( 'GLM Payment', 'GLM Payment', 'manage_options', 'glm_payment', 'glm_payment_options_page' ); } add_action( 'admin_menu', 'my_add_menu_items' ); @@ -56,26 +56,26 @@ function my_render_list_page() { } -add_shortcode('Display Donate', 'wp_donate_form'); +add_shortcode('Display Payment', 'glm_payment_form'); if(isset($_REQUEST['setting'])) { if($_REQUEST['setting']==1) { - $wpdb->query("INSERT INTO `".$wpdb->prefix."donate_setting` (`id`, `mod`, `api_login`, `key`) VALUES ('1', '', '', '')"); - $wpdb->query("UPDATE `".$wpdb->prefix."donate_setting` SET `mod` = '".$_REQUEST['authnet_mode']."',`api_login` = '".$_REQUEST['x_login']."',`key` = '".$_REQUEST['x_tran_key']."' WHERE `id` =1"); + $wpdb->query("INSERT INTO `".$wpdb->prefix."payment_setting` (`id`, `mod`, `api_login`, `key`) VALUES ('1', '', '', '')"); + $wpdb->query("UPDATE `".$wpdb->prefix."payment_setting` SET `mod` = '".$_REQUEST['authnet_mode']."',`api_login` = '".$_REQUEST['x_login']."',`key` = '".$_REQUEST['x_tran_key']."' WHERE `id` =1"); } } -register_activation_hook( __FILE__, 'donate_install' ); +register_activation_hook( __FILE__, 'payment_install' ); -global $donate_db_version; -$donate_db_version = "1.0"; +global $payment_db_version; +$payment_db_version = "1.0"; -function donate_install() { +function payment_install() { global $wpdb; - global $donate_db_version; + global $payment_db_version; - $table_name = $wpdb->prefix . "donate"; + $table_name = $wpdb->prefix . "payment"; $sql = "CREATE TABLE IF NOT EXISTS `$table_name` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(255) CHARACTER SET utf8 NOT NULL, @@ -97,8 +97,8 @@ function donate_install() { UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1"; -$donate_setting = $wpdb->prefix . "donate_setting"; -$donate_setting_sql = "CREATE TABLE IF NOT EXISTS `$donate_setting` ( +$payment_setting = $wpdb->prefix . "payment_setting"; +$payment_setting_sql = "CREATE TABLE IF NOT EXISTS `$payment_setting` ( `id` int(11) NOT NULL AUTO_INCREMENT, `mod` varchar(255) NOT NULL, `api_login` varchar(255) NOT NULL, @@ -109,12 +109,12 @@ UNIQUE KEY `id` (`id`) require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); dbDelta( $sql ); - dbDelta( $donate_setting_sql ); + dbDelta( $payment_setting_sql ); - add_option( "donate_db_version", $donate_db_version ); + add_option( "payment_db_version", $payment_db_version ); } -function donate_install_data() { +function payment_install_data() { global $wpdb; $welcome_name = "Mr. WordPress"; $welcome_text = "Congratulations, you just completed the installation!"; diff --git a/includes/donate-display.php b/includes/donate-display.php deleted file mode 100755 index b079fca..0000000 --- a/includes/donate-display.php +++ /dev/null @@ -1,1391 +0,0 @@ -get_results( "SELECT * FROM ".$wpdb->prefix."donate_setting" ); - define("AUTHORIZENET_API_LOGIN_ID",$mysetting[0]->api_login); // Add your API LOGIN ID - define("AUTHORIZENET_TRANSACTION_KEY",$mysetting[0]->key); // Add your API transaction key - if($mysetting[0]->mod==0){ - define("AUTHORIZENET_SANDBOX",true); // Set to false to test against production - define("TEST_REQUEST", true); // You may want to set to true if testing against production - } - else - { - define("AUTHORIZENET_SANDBOX",false); // Set to false to test against production - define("TEST_REQUEST", false); - } - // You only need to adjust the two variables below if testing DPM - define("AUTHORIZENET_MD5_SETTING",""); // Add your MD5 Setting. - - $REQUEST = $_REQUEST; - if($paypalp = authorizepayment($METHOD_TO_USE,$REQUEST,$address1,$city,$state,$country,$zipcode,$emailaddress,$plan)) - { - $sql = "INSERT INTO `".$wpdb->prefix."donate` (`first_name`, `last_name`, `organization`, `address`, `city`, `country`, `state`, `zip`, `phone`, `email`, `donation_type`, `amount`, `invoice_num`,`comment`, `status`,`date`) - VALUES ('".$first_name."', '".$last_name."','".$organization."','".$address."','".$city."','".$country."','".$state."','".$zip."','".$phone."','".$email."','".$donation_type."','".$amount."','".$invoice_num."','".$comment."', '1',now());"; - $wpdb->query($sql); - - $post = get_post($post->ID); - $slug = $post->post_name; - - header("Location:".site_url().$_SERVER['REQUEST_URI']); - exit; - } - else - { - header("Location:".site_url().$_SERVER['REQUEST_URI']); - exit; - } - - } - } - -function wp_donate_form() { - ob_start(); - global $wpdb; - ?> - - - - diff --git a/includes/donate-display_1.php b/includes/donate-display_1.php index 7dd6fb4..40679f2 100644 --- a/includes/donate-display_1.php +++ b/includes/donate-display_1.php @@ -1,8 +1,8 @@ get_results( "SELECT * FROM ".$wpdb->prefix."donate_setting" ); + $mysetting = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."payment_setting" ); define("AUTHORIZENET_API_LOGIN_ID",$mysetting[0]->api_login); // Add your API LOGIN ID define("AUTHORIZENET_TRANSACTION_KEY",$mysetting[0]->key); // Add your API transaction key if($mysetting[0]->mod==0){ @@ -56,7 +56,7 @@ $REQUEST = $_REQUEST; if($paypalp = authorizepayment($METHOD_TO_USE,$REQUEST,$address1,$city,$state,$country,$zipcode,$emailaddress,$plan)) { - $sql = "INSERT INTO `".$wpdb->prefix."donate` (`first_name`, `last_name`, `organization`, `address`, `city`, `country`, `state`, `zip`, `phone`, `email`, `donation_type`, `amount`, `comment`, `status`,`date`) + $sql = "INSERT INTO `".$wpdb->prefix."payment` (`first_name`, `last_name`, `organization`, `address`, `city`, `country`, `state`, `zip`, `phone`, `email`, `donation_type`, `amount`, `comment`, `status`,`date`) VALUES ('".$first_name."', '".$last_name."','".$organization."','".$address."','".$city."','".$country."','".$state."','".$zip."','".$phone."','".$email."','".$donation_type."','".$amount."','".$comment."', '1',now());"; $wpdb->query($sql); @@ -75,14 +75,14 @@ } } -function wp_donate_form() { +function glm_payment_form() { ob_start(); global $wpdb; ?> - - diff --git a/includes/payment-display.php b/includes/payment-display.php new file mode 100755 index 0000000..002ca03 --- /dev/null +++ b/includes/payment-display.php @@ -0,0 +1,1391 @@ +get_results( "SELECT * FROM ".$wpdb->prefix."payment_setting" ); + define("AUTHORIZENET_API_LOGIN_ID",$mysetting[0]->api_login); // Add your API LOGIN ID + define("AUTHORIZENET_TRANSACTION_KEY",$mysetting[0]->key); // Add your API transaction key + if($mysetting[0]->mod==0){ + define("AUTHORIZENET_SANDBOX",true); // Set to false to test against production + define("TEST_REQUEST", true); // You may want to set to true if testing against production + } + else + { + define("AUTHORIZENET_SANDBOX",false); // Set to false to test against production + define("TEST_REQUEST", false); + } + // You only need to adjust the two variables below if testing DPM + define("AUTHORIZENET_MD5_SETTING",""); // Add your MD5 Setting. + + $REQUEST = $_REQUEST; + if($paypalp = authorizepayment($METHOD_TO_USE,$REQUEST,$address1,$city,$state,$country,$zipcode,$emailaddress,$plan)) + { + $sql = "INSERT INTO `".$wpdb->prefix."payment` (`first_name`, `last_name`, `organization`, `address`, `city`, `country`, `state`, `zip`, `phone`, `email`, `donation_type`, `amount`, `invoice_num`,`comment`, `status`,`date`) + VALUES ('".$first_name."', '".$last_name."','".$organization."','".$address."','".$city."','".$country."','".$state."','".$zip."','".$phone."','".$email."','".$donation_type."','".$amount."','".$invoice_num."','".$comment."', '1',now());"; + $wpdb->query($sql); + + $post = get_post($post->ID); + $slug = $post->post_name; + + header("Location:".site_url().$_SERVER['REQUEST_URI']); + exit; + } + else + { + header("Location:".site_url().$_SERVER['REQUEST_URI']); + exit; + } + + } + } + +function glm_payment_form() { + ob_start(); + global $wpdb; + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

For your convenience, you can pay your Invoices using our secured + online credit card processing form. If you would like to have your + Invoice automatically paid monthly via credit card, please call + the office and we can set that up for you. +

+

+ * denotes a required field. +

+
Billing information
First name* + +
Last name* + +
Organization* + +
Address* + +
City* + +
Country* + +
State* + +
Zip* + +
Phone* + +
Email* + +
Payment Information
Amount* + $
+ +
+
Invoice Number* + +
Card type* + +
Credit Card Number* + +
Expiration Date* + + / + +
Card (CVV) Code* + +
Comment + +
+ +
+ +
+ + + diff --git a/includes/payment-function.php b/includes/payment-function.php new file mode 100755 index 0000000..75d35ab --- /dev/null +++ b/includes/payment-function.php @@ -0,0 +1,290 @@ +setSandbox(AUTHORIZENET_SANDBOX); + $transaction->setFields( + array( + 'amount' => $REQUEST['amount'], + 'invoice_num' => $REQUEST['invoice_num'], + 'card_num' => $REQUEST['x_card_num'], + 'exp_date' => $REQUEST['exp_month'].'/'.$REQUEST['exp_year'], + 'first_name' => $REQUEST['first_name'], + 'last_name' => $REQUEST['last_name'], + 'address' => $REQUEST['address'], + 'city' => $REQUEST['city'], + 'state' => $REQUEST['state'], + 'country' => $REQUEST['country'], + 'zip' => $REQUEST['zip'], + 'email' => $REQUEST['email'], + ) + ); + $response = $transaction->authorizeAndCapture(); + if ($response->approved) + { + $_SESSION['payment_msg'] = $response->response_reason_text; + return true; + } + else + { + //echo "1"; + $_SESSION['payment_msg'] = $response->response_reason_text; + } + } + elseif (count($REQUEST)) + { + $response = new AuthorizeNetSIM; + if ($response->isAuthorizeNet()) + { + if ($response->approved) + { + // Transaction approved! Do your logic here. + // Redirect the user back to your site. + //$return_url = $site_root . 'thank_you_page.php?transaction_id=' .$response->transaction_id; + //echo "2"; + + return true; + } + else + { + // There was a problem. Do your logic here. + // Redirect the user back to your site. + $_SESSION['payment_msg'] = $response->response_reason_text; + // echo "3"; + header("Location:".site_url().$_SERVER['REQUEST_URI']); + exit; + + } + echo AuthorizeNetDPM::getRelayResponseSnippet($return_url); + } + else + { + //echo "4"; + $_SESSION['payment_msg'] = "MD5 Hash failed. Check to make sure your MD5 Setting matches the one in"; + } + } + + } +} + +function checkInvoice($invoice_num) { + if (!preg_match("/^[0-9]{5}$/", $invoice_num)) { + return false; + } + return true; +} + +function checkCreditCard($cardnumber, $cardname, &$errornumber, &$errortext) { + + // Define the cards we support. You may add additional card types. + // Name: As in the selection box of the form - must be same as user's + // Length: List of possible valid lengths of the card number for the card + // prefixes: List of possible prefixes for the card + // checkdigit Boolean to say whether there is a check digit + // Don't forget - all but the last array definition needs a comma separator! + + $cards = array(array('name' => 'AMEX', + 'length' => '15', + 'prefixes' => '34,37', + 'checkdigit' => true + ), + array('name' => 'Diners Club Carte Blanche', + 'length' => '14', + 'prefixes' => '300,301,302,303,304,305', + 'checkdigit' => true + ), + array('name' => 'DINERS', + 'length' => '14,16', + 'prefixes' => '305,36,38,54,55', + 'checkdigit' => true + ), + array('name' => 'Discover', + 'length' => '16', + 'prefixes' => '6011,622,64,65', + 'checkdigit' => true + ), + array('name' => 'Diners Club Enroute', + 'length' => '15', + 'prefixes' => '2014,2149', + 'checkdigit' => true + ), + array('name' => 'JCB', + 'length' => '16', + 'prefixes' => '35', + 'checkdigit' => true + ), + array('name' => 'Maestro', + 'length' => '12,13,14,15,16,18,19', + 'prefixes' => '5018,5020,5038,6304,6759,6761', + 'checkdigit' => true + ), + array('name' => 'MASTERCARD', + 'length' => '16', + 'prefixes' => '51,52,53,54,55', + 'checkdigit' => true + ), + array('name' => 'Solo', + 'length' => '16,18,19', + 'prefixes' => '6334,6767', + 'checkdigit' => true + ), + array('name' => 'Switch', + 'length' => '16,18,19', + 'prefixes' => '4903,4905,4911,4936,564182,633110,6333,6759', + 'checkdigit' => true + ), + array('name' => 'VISA', + 'length' => '16', + 'prefixes' => '4', + 'checkdigit' => true + ), + array('name' => 'VISA Electron', + 'length' => '16', + 'prefixes' => '417500,4917,4913,4508,4844', + 'checkdigit' => true + ), + array('name' => 'LaserCard', + 'length' => '16,17,18,19', + 'prefixes' => '6304,6706,6771,6709', + 'checkdigit' => true + ) + ); + + $ccErrorNo = 0; + + $ccErrors [0] = 'Please enter a valid ' . $cardname . ' number.'; + $ccErrors [1] = "No card number provided"; + $ccErrors [2] = "Credit card number has invalid format"; + $ccErrors [3] = "Credit card number is invalid"; + $ccErrors [4] = "Credit card number is wrong length"; + + // Establish card type + $cardType = -1; + for ($i = 0; $i < sizeof($cards); $i++) { + + // See if it is this card (ignoring the case of the string) + if (strtolower($cardname) == strtolower($cards[$i]['name'])) { + $cardType = $i; + break; + } + } + + // If card type not found, report an error + if ($cardType == -1) { + $errornumber = 0; + $errortext = $ccErrors [$errornumber]; + return false; + } + + // Ensure that the user has provided a credit card number + if (strlen($cardnumber) == 0) { + $errornumber = 1; + $errortext = $ccErrors [$errornumber]; + return false; + } + + // Remove any spaces from the credit card number + $cardNo = str_replace(' ', '', $cardnumber); + + // Check that the number is numeric and of the right sort of length. + if (!preg_match("/^[0-9]{13,19}$/", $cardNo)) { + $errornumber = 2; + $errortext = $ccErrors [$errornumber]; + return false; + } + + + // Now check the modulus 10 check digit - if required + if ($cards[$cardType]['checkdigit']) { + $checksum = 0; // running checksum total + $mychar = ""; // next char to process + $j = 1; // takes value of 1 or 2 + // Process each digit one by one starting at the right + for ($i = strlen($cardNo) - 1; $i >= 0; $i--) { + + // Extract the next digit and multiply by 1 or 2 on alternative digits. + $calc = $cardNo{$i} * $j; + + // If the result is in two digits add 1 to the checksum total + if ($calc > 9) { + $checksum = $checksum + 1; + $calc = $calc - 10; + } + + // Add the units element to the checksum total + $checksum = $checksum + $calc; + + // Switch the value of j + if ($j == 1) { + $j = 2; + } else { + $j = 1; + }; + } + + // All done - if checksum is divisible by 10, it is a valid modulus 10. + // If not, report an error. + if ($checksum % 10 != 0) { + $errornumber = 3; + $errortext = $ccErrors [$errornumber]; + return false; + } + } + + // The following are the card-specific checks we undertake. + // Load an array with the valid prefixes for this card + $prefix = explode(',', $cards[$cardType]['prefixes']); + + // Now see if any of them match what we have in the card number + $PrefixValid = false; + for ($i = 0; $i < sizeof($prefix); $i++) { + $exp = '/^' . $prefix[$i] . '/'; + if (preg_match($exp, $cardNo)) { + $PrefixValid = true; + break; + } + } + + // If it isn't a valid prefix there's no point at looking at the length + if (!$PrefixValid) { + $errornumber = 3; + $errortext = $ccErrors [$errornumber]; + return false; + } + + // See if the length is valid for this card + $LengthValid = false; + $lengths = explode(',', $cards[$cardType]['length']); + for ($j = 0; $j < sizeof($lengths); $j++) { + if (strlen($cardNo) == $lengths[$j]) { + $LengthValid = true; + break; + } + } + + // See if all is OK by seeing if the length was valid. + if (!$LengthValid) { + $errornumber = 4; + $errortext = $ccErrors [$errornumber]; + return false; + }; + + // The credit card is in the required format. + return true; +} + + +?> diff --git a/includes/payment-options.php b/includes/payment-options.php new file mode 100755 index 0000000..20a2ed0 --- /dev/null +++ b/includes/payment-options.php @@ -0,0 +1,199 @@ + + query($wpdb->prepare("DELETE FROM ".$wpdb->prefix."payment WHERE id = %d",$_GET['id'])); + header("Location:".site_url().'/wp-admin/admin.php?page=glm_payment'); + exit; + } + elseif($_GET['id']!='') + { + ?> +
+

GLM Payment

+
+ + + + get_results( "SELECT * FROM ".$wpdb->prefix."payment where id='".$_GET['id']."'" ); + foreach($myrows as $myrows_value) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
First Name :first_name;?>
Last Name :last_name;?>
Organization :organization;?>
Address :address;?>
City :city;?>
Country :country;?>
State :state;?>
Zip : zip;?>
Phone :phone;?>
Email :email;?>
Donation Type :donation_type;?>
Amount :$amount;?>
Invoice Number: invoice_num;?>
Comment :comment;?>
Date :date;?>
Action : status==1){echo "Complete";} else {echo "Pending";}?>
/wp-admin/admin.php?page=glm_payment' value="Back" />
+
+
+ + + +
+

GLM Payment

+ +
+
+ + get_results( "SELECT * FROM ".$wpdb->prefix."payment"); + if(count($myrows)>0) + { + ?> + + + + + + + + + + + + + + + + + + + + + +
PersonEmailAmountDateCommentAction
first_name.' '.$myrows_value->last_name ;?>email;?>$amount;?>date;?>comment;?>Delete
+
+
+ get_results( "SELECT * FROM ".$wpdb->prefix."payment_setting" ); + ?> +
+ +
    +
  • + Authorize.net Mode + +
  • +
  • + API Login + +
  • +
  • + Transaction Key + +
  • +
    + +
+
+
+ +
+ diff --git a/js/glm-donate.js b/js/glm-donate.js deleted file mode 100755 index 72cc2d1..0000000 --- a/js/glm-donate.js +++ /dev/null @@ -1,117 +0,0 @@ -/** - * glm-payments - * - * @since 1.4 - * - */ - -// var glm-payments-key declared in DOM from localized script - -donate.setPublishableKey( wpdonatekey ); - -// donate Token Creation & Event Handling - -jQuery(document).ready(function($) { - - var resetdonateForm = function() { - $("#glm-payments-payment-form").get(0).reset(); - $('input').removeClass('donate-valid donate-invalid'); - } - - function donateResponseHandler(status, response) { - if (response.error) { - - $('.donate-submit-button').prop("disabled", false).css("opacity","1.0"); - $(".payment-errors").show().html(response.error.message); - - } else { - - var form$ = $("#glm-payments-payment-form"); - var token = response['id']; - form$.append(""); - - var newdonateForm = form$.serialize(); - - $.ajax({ - type : "post", - dataType : "json", - url : ajaxurl, - data : newdonateForm, - success: function(response) { - - $('.glm-payments-details').prepend(response); - $('.donate-submit-button').prop("disabled", false).css("opacity","1.0"); - resetdonateForm(); - - } - - }); - - } - } - - $("#glm-payments-payment-form").submit(function(event) { - - event.preventDefault(); - $(".glm-payments-notification").hide(); - - $('.donate-submit-button').prop("disabled", true).css("opacity","0.4"); - - var amount = $('.glm-payments-card-amount').val() * 100; //amount you want to charge in cents - - donate.createToken({ - name: $('.glm-payments-name').val(), - number: $('.card-number').val(), - cvc: $('.card-cvc').val(), - exp_month: $('.card-expiry-month').val(), - exp_year: $('.card-expiry-year').val() - }, donateResponseHandler); - - // prevent the form from submitting with the default action - - return false; - - }); -}); - -// Form Validation & Enhancement - -jQuery(document).ready(function($) { - - $('.card-number').focusout( function() { - - var cardValid = donate.validateCardNumber( $(this).val() ); - var cardType = donate.cardType( $(this).val() ); - - // Card Number Validation - - if ( cardValid ) { - $(this).removeClass('donate-invalid').addClass('donate-valid'); - } else { - $(this).removeClass('donate-valid').addClass('donate-invalid'); - } - - // Card Type Information - - /* - if ( cardType && cardValid ) { - // Display Card Logo - } - */ - - }); - - // CVC Validation - - $('.card-cvc').focusout( function() { - - if ( donate.validateCVC( $(this).val() ) ) { - $(this).removeClass('donate-invalid').addClass('donate-valid'); - } else { - $(this).removeClass('donate-valid').addClass('donate-invalid'); - } - - }); - -}); - diff --git a/js/glm-payments.js b/js/glm-payments.js new file mode 100755 index 0000000..9b39bb5 --- /dev/null +++ b/js/glm-payments.js @@ -0,0 +1,117 @@ +/** + * glm-payments + * + * @since 1.4 + * + */ + +// var glm-payments-key declared in DOM from localized script + +payment.setPublishableKey( wppaymentkey ); + +// payment Token Creation & Event Handling + +jQuery(document).ready(function($) { + + var resetpaymentForm = function() { + $("#glm-payments-payment-form").get(0).reset(); + $('input').removeClass('payment-valid payment-invalid'); + } + + function paymentResponseHandler(status, response) { + if (response.error) { + + $('.payment-invalid-button').prop("disabled", false).css("opacity","1.0"); + $(".payment-errors").show().html(response.error.message); + + } else { + + var form$ = $("#glm-payments-payment-form"); + var token = response['id']; + form$.append(""); + + var newpaymentForm = form$.serialize(); + + $.ajax({ + type : "post", + dataType : "json", + url : ajaxurl, + data : newpaymentForm, + success: function(response) { + + $('.glm-payments-details').prepend(response); + $('.payment-invalid-button').prop("disabled", false).css("opacity","1.0"); + resetpaymentForm(); + + } + + }); + + } + } + + $("#glm-payments-payment-form").submit(function(event) { + + event.preventDefault(); + $(".glm-payments-notification").hide(); + + $('.payment-invalid-button').prop("disabled", true).css("opacity","0.4"); + + var amount = $('.glm-payments-card-amount').val() * 100; //amount you want to charge in cents + + payment.createToken({ + name: $('.glm-payments-name').val(), + number: $('.card-number').val(), + cvc: $('.card-cvc').val(), + exp_month: $('.card-expiry-month').val(), + exp_year: $('.card-expiry-year').val() + }, paymentResponseHandler); + + // prevent the form from submitting with the default action + + return false; + + }); +}); + +// Form Validation & Enhancement + +jQuery(document).ready(function($) { + + $('.card-number').focusout( function() { + + var cardValid = payment.validateCardNumber( $(this).val() ); + var cardType = payment.cardType( $(this).val() ); + + // Card Number Validation + + if ( cardValid ) { + $(this).removeClass('payment-invalid').addClass('payment-valid'); + } else { + $(this).removeClass('payment-valid').addClass('payment-invalid'); + } + + // Card Type Information + + /* + if ( cardType && cardValid ) { + // Display Card Logo + } + */ + + }); + + // CVC Validation + + $('.card-cvc').focusout( function() { + + if ( payment.validateCVC( $(this).val() ) ) { + $(this).removeClass('payment-invalid').addClass('payment-valid'); + } else { + $(this).removeClass('payment-valid').addClass('payment-invalid'); + } + + }); + +}); + diff --git a/readme.txt b/readme.txt index c9d4774..1d0fb21 100755 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ === glm-payments === Contributors: ketanajani -Donate link: http://webconfines.com -Tags: donate, authorizeNet , credit card, payment, pay, transfer, charge, widget, form, chargly, recurly, recent, donation, donations, charity, transaction, money, wordpress +Payment link: http://webconfines.com +Tags: payment, authorizeNet , credit card, payment, pay, transfer, charge, widget, form, chargly, recurly, recent, donation, donations, charity, transaction, money, wordpress Requires at least: 3.0 Tested up to: 3.6 Stable tag: 0.6 @@ -12,7 +12,7 @@ glm-payments provides a payment form and recent donor by utilizing AuthorizeNet. == Description == -WP Donate provides a payment form and recent donor widget by utilizing Authorize.net. +GLM Payment provides a payment form and recent donor widget by utilizing Authorize.net. What glm-payments provides: @@ -25,12 +25,12 @@ If you need any modification in plugin or need some extra functionality than ple == Installation == -WP Donate can be used by either calling up a simple shortcode or adding the function to your template as below: +GLM Payment can be used by either calling up a simple shortcode or adding the function to your template as below: 1. Upload the folder `glm-payments` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress -1. Go to WP Donate (for both Test & Live) -1. Place `[Display Donate]` in your content or `` in your template. +1. Go to GLM Payment (for both Test & Live) +1. Place `[Display Payment]` in your content or `` in your template. == Frequently Asked Questions == = Will it work on my Theme? = @@ -38,7 +38,7 @@ glm-payments features an inline form so that it can fit any theme. that you can = Can I expand this plugin = Yes you can customize or expand plugin by adding new payment gateways to receive donation or customization can be made in form related to fields. = About SSL = -In order to process transactions in a secure manner, you need to [purchase an SSL Certificate](http://www.noeltock.com/sslcertificates/). This way consumers can purchase/donate with confidence. There are multiple plugins for then enforcing that SSL be used on your page, [here's one](http://wordpress.org/extend/plugins/wordpress-https/). +In order to process transactions in a secure manner, you need to [purchase an SSL Certificate](http://www.noeltock.com/sslcertificates/). This way consumers can purchase/payment with confidence. There are multiple plugins for then enforcing that SSL be used on your page, [here's one](http://wordpress.org/extend/plugins/wordpress-https/). = Support available? = If you need any modification in plugin or need some extra functionality than please let us know here http://www.webconfines.com/contact-us = What are limitations of this plugin? = diff --git a/wp-donate.php b/wp-donate.php deleted file mode 100755 index 33d7da6..0000000 --- a/wp-donate.php +++ /dev/null @@ -1,124 +0,0 @@ -query("INSERT INTO `".$wpdb->prefix."donate_setting` (`id`, `mod`, `api_login`, `key`) VALUES ('1', '', '', '')"); - $wpdb->query("UPDATE `".$wpdb->prefix."donate_setting` SET `mod` = '".$_REQUEST['authnet_mode']."',`api_login` = '".$_REQUEST['x_login']."',`key` = '".$_REQUEST['x_tran_key']."' WHERE `id` =1"); - } -} - -register_activation_hook( __FILE__, 'donate_install' ); - -global $donate_db_version; -$donate_db_version = "1.0"; - -function donate_install() { - global $wpdb; - global $donate_db_version; - - $table_name = $wpdb->prefix . "donate"; - $sql = "CREATE TABLE IF NOT EXISTS `$table_name` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `first_name` varchar(255) CHARACTER SET utf8 NOT NULL, - `last_name` varchar(255) CHARACTER SET utf8 NOT NULL, - `organization` varchar(255) CHARACTER SET utf8 NOT NULL, - `address` varchar(255) CHARACTER SET utf8 NOT NULL, - `city` varchar(255) CHARACTER SET utf8 NOT NULL, - `country` varchar(255) CHARACTER SET utf8 NOT NULL, - `state` varchar(255) CHARACTER SET utf8 NOT NULL, - `zip` varchar(255) CHARACTER SET utf8 NOT NULL, - `phone` varchar(255) NOT NULL, - `email` varchar(255) NOT NULL, - `donation_type` varchar(255) NOT NULL, - `amount` varchar(255) NOT NULL, - `comment` text NOT NULL, - `status` varchar(255) NOT NULL, - `date` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1"; - -$donate_setting = $wpdb->prefix . "donate_setting"; -$donate_setting_sql = "CREATE TABLE IF NOT EXISTS `$donate_setting` ( -`id` int(11) NOT NULL AUTO_INCREMENT, -`mod` varchar(255) NOT NULL, -`api_login` varchar(255) NOT NULL, -`key` varchar(255) NOT NULL, -PRIMARY KEY (`id`), -UNIQUE KEY `id` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2"; - - require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); - dbDelta( $sql ); - dbDelta( $donate_setting_sql ); - - add_option( "donate_db_version", $donate_db_version ); -} - -function donate_install_data() { - global $wpdb; - $welcome_name = "Mr. WordPress"; - $welcome_text = "Congratulations, you just completed the installation!"; - $rows_affected = $wpdb->insert( $table_name, array( 'time' => current_time('mysql'), 'name' => $welcome_name, 'text' => $welcome_text ) ); -} -?>