Plugin Directory

Changeset 2051367


Ignore:
Timestamp:
03/15/2019 04:28:09 PM (7 years ago)
Author:
pderksen
Message:

Committing 2.1.0

Location:
stripe/trunk
Files:
20 added
7 deleted
78 edited

Legend:

Unmodified
Added
Removed
  • stripe/trunk/assets/css/_mixins.scss

    r1851310 r2051367  
    1 // Clearfix
     1// Fonts
     2
     3@mixin antialias() {
     4    -webkit-font-smoothing: antialiased;
     5    -moz-osx-font-smoothing: grayscale;
     6}
     7
     8@mixin font-checkout() {
     9    // Font to use in embedded & overlay checkout (text & fields)
     10    // Repeated in Elements JS
     11    // For Card/Postal fields: https://stripe.com/docs/stripe-js/reference#the-elements-object
     12
     13    font-family: Roboto, 'Open Sans', Segoe UI, sans-serif;
     14    @include antialias();
     15}
     16
     17@mixin font-system() {
     18    // System fonts like WordPress admin
     19    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
     20}
     21
     22// Misc
    223
    324@mixin clearfix() {
     
    1940}
    2041
    21 // Box Sizing
    22 
    2342@mixin box-sizing($box-model) {
    2443    -webkit-box-sizing: $box-model; // Safari <= 5
     
    2746}
    2847
    29 // CSS3 Easing
    30 
    3148@mixin easing-transition() {
    3249    -moz-transition: 0.2s all linear;
     
    3451    transition: 0.2s all linear;
    3552}
     53
  • stripe/trunk/assets/css/admin-all-pages.min.css

    r1967366 r2051367  
    1 /*! WP Simple Pay Lite for Stripe - 2.0.12
     1/*! WP Simple Pay Lite for Stripe - 2.1.0
    22 * https://wpsimplepay.com/
    3  * Copyright (c) Moonstone Media Group 2018
     3 * Copyright (c) Moonstone Media Group 2019
    44 * Licensed GPLv2+ */
    55
  • stripe/trunk/assets/css/admin.css

    r1851310 r2051367  
    1111
    1212#simpay-global-settings {
    13   margin-right: 310px; }
     13  /* Should be 40px more than #simpay-settings-sidebar-right below. */
     14  margin-right: 350px; }
    1415  @media (max-width: 768px) {
    1516    #simpay-global-settings {
     
    2425  #simpay-global-settings #simpay-settings-sidebar-right {
    2526    float: right;
    26     width: 270px;
    27     margin-right: -290px; }
     27    /* Move width down to 270px if extra space not needed. */
     28    width: 310px;
     29    /* margin-right should be negative of width and subtract another 20px. */
     30    margin-right: -330px; }
    2831    @media (max-width: 768px) {
    2932      #simpay-global-settings #simpay-settings-sidebar-right {
     
    139142  #simpay-form-settings .simpay-panel > table {
    140143    width: 100%; }
     144    #simpay-form-settings .simpay-panel > table:last-of-type {
     145      margin-bottom: 20px; }
    141146    #simpay-form-settings .simpay-panel > table thead th {
    142147      border-bottom: 1px solid #eee;
     
    232237#simpay-global-settings .simpay-docs-link-wrap,
    233238#simpay-form-settings .simpay-docs-link-wrap {
     239  position: absolute;
     240  right: 0;
     241  bottom: 0;
    234242  color: #666;
    235   float: right;
    236243  font-size: 13px;
    237244  font-style: italic;
     
    303310    .simpay-system-status-report-panel mark.warning {
    304311      color: #ffb900; }
     312
     313/*
     314 * Stripe Connect
     315 */
     316#wpsp-api-keys-row-hide {
     317  display: none; }
     318
     319.wpsp-stripe-connect {
     320  display: inline-block;
     321  margin-bottom: 1px;
     322  background-image: -webkit-linear-gradient(#28A0E5, #015E94);
     323  background-image: -moz-linear-gradient(#28A0E5, #015E94);
     324  background-image: -ms-linear-gradient(#28A0E5, #015E94);
     325  background-image: linear-gradient(#28A0E5, #015E94);
     326  -webkit-font-smoothing: antialiased;
     327  border: 0;
     328  padding: 1px;
     329  height: 30px;
     330  text-decoration: none;
     331  -moz-border-radius: 4px;
     332  -webkit-border-radius: 4px;
     333  border-radius: 4px;
     334  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
     335  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
     336  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
     337  cursor: pointer;
     338  -moz-user-select: none;
     339  -webkit-user-select: none;
     340  -ms-user-select: none;
     341  user-select: none; }
     342  .wpsp-stripe-connect span {
     343    display: block;
     344    position: relative;
     345    padding: 0 12px 0 44px;
     346    height: 30px;
     347    background: #1275FF;
     348    background-image: -webkit-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4);
     349    background-image: -moz-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4);
     350    background-image: -ms-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4);
     351    background-image: linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4);
     352    font-size: 14px;
     353    line-height: 30px;
     354    color: white;
     355    font-weight: bold;
     356    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
     357    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
     358    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
     359    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
     360    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
     361    -moz-border-radius: 3px;
     362    -webkit-border-radius: 3px;
     363    border-radius: 3px; }
     364    .wpsp-stripe-connect span:before {
     365      content: '';
     366      display: block;
     367      position: absolute;
     368      left: 11px;
     369      top: 50%;
     370      width: 23px;
     371      height: 24px;
     372      margin-top: -12px;
     373      background-repeat: no-repeat;
     374      background-size: 23px 24px; }
     375  .wpsp-stripe-connect:active {
     376    background: #005D93; }
     377    .wpsp-stripe-connect:active span {
     378      color: #EEE;
     379      background: #008CDD;
     380      background-image: -webkit-linear-gradient(#008CDD, #008CDD 85%, #239ADF);
     381      background-image: -moz-linear-gradient(#008CDD, #008CDD 85%, #239ADF);
     382      background-image: -ms-linear-gradient(#008CDD, #008CDD 85%, #239ADF);
     383      background-image: linear-gradient(#008CDD, #008CDD 85%, #239ADF);
     384      -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
     385      -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
     386      box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1); }
     387  .wpsp-stripe-connect span:before,
     388  .wpsp-stripe-connect.blue span:before {
     389    background-image: url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Wl1463cy1U3WroG21jhCGKJXPOtKQnpAuENvsAppgDB3TcDVIrpDHbK5Kd+y7W8iodNybHh22rOHyxUK+UaMYjZaoyp25rYL54TSihSKmwZ14v3lc3ZFxdbeywjn/tGJnkmzrydX1ApxOEACKymmXLYfXVpi1JMEOGxPi1ep18doY4r2J7uFumQQ9yGf01bMcZW8dpyc0oIjxxpuC5wuUDX+ovWrnYeg3aXvdLIqnmOvXPsfH6uA5YbTb1DX8ofvTLzTy6ZV4K6fAw+gXiATfdffmjeaUgc1UdpdWplsCooQBrEnqUw82dhdnjit/Vxc4f59tP3DRjzJvYteqrl4rmNlJIfrOwpgNklesDRNQBCHYtQAQqD2CgACNjHAJnG1EyfV/S67fZiJB5t2OGEe4n7L3fS4fpEv/2hUEATfoPbuam5v8N7nps70YTbAAAAAElFTkSuQmCC"); }
     390
     391@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
     392  .wpsp-stripe-connect span:before, .wpsp-stripe-connect.blue span:before {
     393    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAYAAABuZUjcAAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0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PlTlxzqaJLquYZU1HTvjcTMD6dOULM0n+g5nKposHzdWbo7FgEkDBviWlYx++53XtQ33kvDU8dHAJm6L8usdwEZn09S3qiPed5lcCSLUpI0eEA8620zLbDl6bh8T+egkI+/7Rl6kegcTSPst1QUKaM+brhrjnF2yUQJNxnrGMnR7KbTw5nYFVjyAl98w2+VdvVlA67Dw3BgROjAKa+yyrpz0BKTbJnez1NT6AKrrnA1bEi1av2v3xaiL90dnxL2Kc0rsXc4WpcQEc8AEtiGrRiejmK6WWeMDIxtVwwKExijB5KFuBYIg1cy8dx0dTQ/yQVc78yBXMIqJ5i/VvvkqHdSjXuM/THKy7w2LQJ6fpJms38QiHGvlzBt+RwJv2JQ2elbjyRtjIi1AIRMAsKPuQduHVzr2YW+kIBE5BTwOzzxLKOiMX8QVuWh00IpqD+S0WHtLlzefpLBOZo/IYvEqQPnTX5dxmy4xookqaCjRuT4mMi8g3bxs2KCkj3GFj4+QSzA0RkeskU8iCJeUiBDv09Jt8OPEV6k7DlP3gxxh/dAPymPh/Kf5d897dIOd9P7H8oEd4G1JV8wPGbRadx52sgLmrRAZ99EZ5+LZgV+v+4Llrg/wX6HRCxgvzAAwAAAABJRU5ErkJggg=="); } }
     394
     395/* End of Stripe Connect */
  • stripe/trunk/assets/css/admin.min.css

    r1967366 r2051367  
    1 /*! WP Simple Pay Lite for Stripe - 2.0.12
     1/*! WP Simple Pay Lite for Stripe - 2.1.0
    22 * https://wpsimplepay.com/
    3  * Copyright (c) Moonstone Media Group 2018
     3 * Copyright (c) Moonstone Media Group 2019
    44 * Licensed GPLv2+ */
    55
    6 .simpay-clearfix::after,.simpay-clearfix::before{content:" ";display:table}.simpay-clearfix::after{clear:both}.simpay-metabox-title{border:1px solid #eee}#simpay-global-settings{margin-right:310px}@media (max-width:768px){#simpay-global-settings{margin-right:0}}#simpay-global-settings .form-table .payment-details-description-tag{display:inline-block;background:rgba(0,0,0,.07);padding:0 3px}#simpay-global-settings #simpay-settings-left{float:left;width:100%}#simpay-global-settings #simpay-settings-sidebar-right{float:right;width:270px;margin-right:-290px}@media (max-width:768px){#simpay-global-settings #simpay-settings-sidebar-right{float:left;margin-right:0}}#simpay-global-settings #simpay-settings-sidebar-right h3{padding:10px 12px}#simpay-global-settings #simpay-settings-sidebar-right .centered{text-align:center}#simpay-global-settings #simpay-settings-sidebar-right .button-large{font-size:17px;line-height:30px;height:32px}#simpay-global-settings #simpay-settings-sidebar-right .sidebar-heading{font-size:17px}#simpay-global-settings #simpay-settings-sidebar-right .postbox-nobg{position:relative;min-width:255px}#simpay-global-settings #simpay-settings-sidebar-right .sidebar-container .postbox .inside{margin-bottom:0}#simpay-form-settings .inside{margin:0;padding:0}#simpay-form-settings .simpay-tabs{background:#fafafa;border-right:1px solid #eee;box-sizing:border-box;float:left;line-height:1em;margin:0;padding:0 0 10px;position:relative;width:25%}#simpay-form-settings .simpay-tabs li{display:block;margin:0;padding:0}#simpay-form-settings .simpay-tabs li.active a{background-color:#eee;color:#555;position:relative}#simpay-form-settings .simpay-tabs li .simpay-tab-item{border-bottom:1px solid #eee;display:block;line-height:20px;margin:0;padding:10px;text-decoration:none}#simpay-form-settings .simpay-tabs li .simpay-tab-item:focus{box-shadow:none}#simpay-form-settings .simpay-tabs::after{background-color:#fafafa;border-right:1px solid #eee;bottom:-9999em;content:"";display:block;height:9999em;left:0;position:absolute;width:100%}#simpay-form-settings .simpay-panels-wrap{background:#fff;min-height:350px;overflow:hidden}#simpay-form-settings .simpay-panel-field>td{width:82%}#simpay-form-settings .simpay-panel-field>th{font-weight:400;min-width:200px;width:15%}#simpay-form-settings .simpay-panel-field>td,#simpay-form-settings .simpay-panel-field>th{padding:5px 20px 10px 10px;text-align:left;vertical-align:text-top}#simpay-form-settings .simpay-panel-field .simpay-field-text{max-width:500px;width:100%}#simpay-form-settings .simpay-panel-field .error,#simpay-form-settings .simpay-panel-field .simpay-important{color:#a94442;font-weight:400}#simpay-form-settings .simpay-panel-field .simpay-image-preview-wrap{position:relative;margin-top:12px}#simpay-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-remove-image-preview{position:absolute;top:-15px;left:-15px;cursor:pointer;background-color:#fff}#simpay-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-remove-image-preview::before{font-size:22px;line-height:26px}#simpay-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-image-preview{max-height:128px;max-width:128px;border:1px solid #ddd}#simpay-form-settings .simpay-panel{margin-left:25%;max-width:75%;padding-bottom:30px}#simpay-form-settings .simpay-panel>table{width:100%}#simpay-form-settings .simpay-panel>table thead th{border-bottom:1px solid #eee;font-size:14px;font-weight:700;padding:12px 0 15px 10px;text-align:left}#simpay-form-settings .simpay-panel>table>tbody tr:first-child td,#simpay-form-settings .simpay-panel>table>tbody tr:first-child th{padding-top:14px}#simpay-form-settings .simpay-panel>table>tbody tr:last-child td,#simpay-form-settings .simpay-panel>table>tbody tr:last-child th{border-bottom:0;padding-bottom:0}#simpay-form-settings .simpay-panel .simpay-promo-under-box{background-color:#f4f4f4;border:1px solid #e5e5e5;padding:10px 20px;margin:30px 15px}#simpay-form-settings .simpay-panel .simpay-promo-under-box h2{font-size:18px;font-weight:600;margin:0;padding:0}#simpay-form-settings .simpay-panel .simpay-promo-under-box p{font-size:14px}#simpay-form-settings .simpay-panel-hidden{display:none}#simpay-form-settings .chosen-container,#simpay-global-settings .chosen-container{min-width:20em;max-width:30em}#simpay-form-settings .simpay-field.simpay-small-text,#simpay-global-settings .simpay-field.simpay-small-text{width:7em}#simpay-form-settings .simpay-field.simpay-medium-text,#simpay-global-settings .simpay-field.simpay-medium-text{width:15em}#simpay-form-settings .simpay-field-radios>i,#simpay-global-settings .simpay-field-radios>i{margin-left:5px;vertical-align:middle}#simpay-form-settings .simpay-field-radios-inline,#simpay-global-settings .simpay-field-radios-inline{margin:0}#simpay-form-settings .simpay-field-radios-inline>li,#simpay-global-settings .simpay-field-radios-inline>li{display:inline-block;margin-right:10px}#simpay-form-settings .simpay-field-radios-inline>li:last-child,#simpay-global-settings .simpay-field-radios-inline>li:last-child{margin-right:0}#simpay-form-settings .simpay-field-select,#simpay-global-settings .simpay-field-select{max-width:20em!important}#simpay-form-settings .simpay-currency-symbol,#simpay-global-settings .simpay-currency-symbol{background-color:#f2f2f2;border:1px solid #ddd;margin:0;padding:5px 8px;font-size:14px}#simpay-form-settings .simpay-currency-symbol-left,#simpay-global-settings .simpay-currency-symbol-left{border-right:none;margin-right:-4px}#simpay-form-settings .simpay-currency-symbol-right,#simpay-global-settings .simpay-currency-symbol-right{border-left:none;margin-left:-4px}#simpay-form-settings .simpay-amount-input,#simpay-global-settings .simpay-amount-input{margin:0;padding:5px;font-size:14px;width:6em}#simpay-form-settings .simpay-error,#simpay-global-settings .simpay-error{color:red}#simpay-form-settings .simpay-docs-link-wrap,#simpay-global-settings .simpay-docs-link-wrap{color:#666;float:right;font-size:13px;font-style:italic;padding:20px}#simpay-form-settings .simpay-docs-link-wrap a .dashicons-editor-help,#simpay-global-settings .simpay-docs-link-wrap a .dashicons-editor-help{color:#666;text-decoration:none;width:17px;height:17px;font-size:17px;padding-left:4px}#simpay-form-settings .simpay-upgrade-btn,#simpay-global-settings .simpay-upgrade-btn{background-color:#428bca;border:1px solid #2d6ca2;border-radius:5px;color:#fff;display:inline-block;font-size:13px;font-weight:400;padding:5px 10px;text-decoration:none;white-space:nowrap}#simpay-form-settings .simpay-upgrade-btn:hover,#simpay-global-settings .simpay-upgrade-btn:hover{background-color:#037ad0;border:1px solid #025794}#simpay-get-shortcode input.simpay-shortcode{border:1px solid #ddd}#simpay-system-status-report textarea{font-family:monospace;min-height:200px;padding:5px 20px;white-space:pre;width:100%}.simpay-system-status-report-panel{margin:20px 0}.simpay-system-status-report-panel thead th{font-weight:700}.simpay-system-status-report-panel tbody td,.simpay-system-status-report-panel thead th{font-size:14px;vertical-align:top}.simpay-system-status-report-panel tbody .label{width:30%}.simpay-system-status-report-panel tbody tr:nth-child(odd) td{background-color:rgba(0,0,0,.02)}.simpay-system-status-report-panel dl{margin:0;padding:0}.simpay-system-status-report-panel dt{float:left;font-style:italic;margin:0 4px 0 0}.simpay-system-status-report-panel dd{margin:0}.simpay-system-status-report-panel mark{background-color:transparent;font-weight:700}.simpay-system-status-report-panel mark.ok{color:green}.simpay-system-status-report-panel mark.error{color:red}.simpay-system-status-report-panel mark.warning{color:#ffb900}
     6.simpay-clearfix::after,.simpay-clearfix::before{content:" ";display:table}.simpay-clearfix::after{clear:both}.simpay-metabox-title{border:1px solid #eee}#simpay-global-settings{margin-right:350px}@media (max-width:768px){#simpay-global-settings{margin-right:0}}#simpay-global-settings .form-table .payment-details-description-tag{display:inline-block;background:rgba(0,0,0,.07);padding:0 3px}#simpay-global-settings #simpay-settings-left{float:left;width:100%}#simpay-global-settings #simpay-settings-sidebar-right{float:right;width:310px;margin-right:-330px}@media (max-width:768px){#simpay-global-settings #simpay-settings-sidebar-right{float:left;margin-right:0}}#simpay-global-settings #simpay-settings-sidebar-right h3{padding:10px 12px}#simpay-global-settings #simpay-settings-sidebar-right .centered{text-align:center}#simpay-global-settings #simpay-settings-sidebar-right .button-large{font-size:17px;line-height:30px;height:32px}#simpay-global-settings #simpay-settings-sidebar-right .sidebar-heading{font-size:17px}#simpay-global-settings #simpay-settings-sidebar-right .postbox-nobg{position:relative;min-width:255px}#simpay-global-settings #simpay-settings-sidebar-right .sidebar-container .postbox .inside{margin-bottom:0}#simpay-form-settings .inside{margin:0;padding:0}#simpay-form-settings .simpay-tabs{background:#fafafa;border-right:1px solid #eee;box-sizing:border-box;float:left;line-height:1em;margin:0;padding:0 0 10px;position:relative;width:25%}#simpay-form-settings .simpay-tabs li{display:block;margin:0;padding:0}#simpay-form-settings .simpay-tabs li.active a{background-color:#eee;color:#555;position:relative}#simpay-form-settings .simpay-tabs li .simpay-tab-item{border-bottom:1px solid #eee;display:block;line-height:20px;margin:0;padding:10px;text-decoration:none}#simpay-form-settings .simpay-tabs li .simpay-tab-item:focus{box-shadow:none}#simpay-form-settings .simpay-tabs::after{background-color:#fafafa;border-right:1px solid #eee;bottom:-9999em;content:"";display:block;height:9999em;left:0;position:absolute;width:100%}#simpay-form-settings .simpay-panels-wrap{background:#fff;min-height:350px;overflow:hidden}#simpay-form-settings .simpay-panel-field>td{width:82%}#simpay-form-settings .simpay-panel-field>th{font-weight:400;min-width:200px;width:15%}#simpay-form-settings .simpay-panel-field>td,#simpay-form-settings .simpay-panel-field>th{padding:5px 20px 10px 10px;text-align:left;vertical-align:text-top}#simpay-form-settings .simpay-panel-field .simpay-field-text{max-width:500px;width:100%}#simpay-form-settings .simpay-panel-field .error,#simpay-form-settings .simpay-panel-field .simpay-important{color:#a94442;font-weight:400}#simpay-form-settings .simpay-panel-field .simpay-image-preview-wrap{position:relative;margin-top:12px}#simpay-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-remove-image-preview{position:absolute;top:-15px;left:-15px;cursor:pointer;background-color:#fff}#simpay-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-remove-image-preview::before{font-size:22px;line-height:26px}#simpay-form-settings .simpay-panel-field .simpay-image-preview-wrap .simpay-image-preview{max-height:128px;max-width:128px;border:1px solid #ddd}#simpay-form-settings .simpay-panel{margin-left:25%;max-width:75%;padding-bottom:30px}#simpay-form-settings .simpay-panel>table{width:100%}#simpay-form-settings .simpay-panel>table:last-of-type{margin-bottom:20px}#simpay-form-settings .simpay-panel>table thead th{border-bottom:1px solid #eee;font-size:14px;font-weight:700;padding:12px 0 15px 10px;text-align:left}#simpay-form-settings .simpay-panel>table>tbody tr:first-child td,#simpay-form-settings .simpay-panel>table>tbody tr:first-child th{padding-top:14px}#simpay-form-settings .simpay-panel>table>tbody tr:last-child td,#simpay-form-settings .simpay-panel>table>tbody tr:last-child th{border-bottom:0;padding-bottom:0}#simpay-form-settings .simpay-panel .simpay-promo-under-box{background-color:#f4f4f4;border:1px solid #e5e5e5;padding:10px 20px;margin:30px 15px}#simpay-form-settings .simpay-panel .simpay-promo-under-box h2{font-size:18px;font-weight:600;margin:0;padding:0}#simpay-form-settings .simpay-panel .simpay-promo-under-box p{font-size:14px}#simpay-form-settings .simpay-panel-hidden{display:none}#simpay-form-settings .chosen-container,#simpay-global-settings .chosen-container{min-width:20em;max-width:30em}#simpay-form-settings .simpay-field.simpay-small-text,#simpay-global-settings .simpay-field.simpay-small-text{width:7em}#simpay-form-settings .simpay-field.simpay-medium-text,#simpay-global-settings .simpay-field.simpay-medium-text{width:15em}#simpay-form-settings .simpay-field-radios>i,#simpay-global-settings .simpay-field-radios>i{margin-left:5px;vertical-align:middle}#simpay-form-settings .simpay-field-radios-inline,#simpay-global-settings .simpay-field-radios-inline{margin:0}#simpay-form-settings .simpay-field-radios-inline>li,#simpay-global-settings .simpay-field-radios-inline>li{display:inline-block;margin-right:10px}#simpay-form-settings .simpay-field-radios-inline>li:last-child,#simpay-global-settings .simpay-field-radios-inline>li:last-child{margin-right:0}#simpay-form-settings .simpay-field-select,#simpay-global-settings .simpay-field-select{max-width:20em!important}#simpay-form-settings .simpay-currency-symbol,#simpay-global-settings .simpay-currency-symbol{background-color:#f2f2f2;border:1px solid #ddd;margin:0;padding:5px 8px;font-size:14px}#simpay-form-settings .simpay-currency-symbol-left,#simpay-global-settings .simpay-currency-symbol-left{border-right:none;margin-right:-4px}#simpay-form-settings .simpay-currency-symbol-right,#simpay-global-settings .simpay-currency-symbol-right{border-left:none;margin-left:-4px}#simpay-form-settings .simpay-amount-input,#simpay-global-settings .simpay-amount-input{margin:0;padding:5px;font-size:14px;width:6em}#simpay-form-settings .simpay-error,#simpay-global-settings .simpay-error{color:red}#simpay-form-settings .simpay-docs-link-wrap,#simpay-global-settings .simpay-docs-link-wrap{position:absolute;right:0;bottom:0;color:#666;font-size:13px;font-style:italic;padding:20px}#simpay-form-settings .simpay-docs-link-wrap a .dashicons-editor-help,#simpay-global-settings .simpay-docs-link-wrap a .dashicons-editor-help{color:#666;text-decoration:none;width:17px;height:17px;font-size:17px;padding-left:4px}#simpay-form-settings .simpay-upgrade-btn,#simpay-global-settings .simpay-upgrade-btn{background-color:#428bca;border:1px solid #2d6ca2;border-radius:5px;color:#fff;display:inline-block;font-size:13px;font-weight:400;padding:5px 10px;text-decoration:none;white-space:nowrap}#simpay-form-settings .simpay-upgrade-btn:hover,#simpay-global-settings .simpay-upgrade-btn:hover{background-color:#037ad0;border:1px solid #025794}#simpay-get-shortcode input.simpay-shortcode{border:1px solid #ddd}#simpay-system-status-report textarea{font-family:monospace;min-height:200px;padding:5px 20px;white-space:pre;width:100%}.simpay-system-status-report-panel{margin:20px 0}.simpay-system-status-report-panel thead th{font-weight:700}.simpay-system-status-report-panel tbody td,.simpay-system-status-report-panel thead th{font-size:14px;vertical-align:top}.simpay-system-status-report-panel tbody .label{width:30%}.simpay-system-status-report-panel tbody tr:nth-child(odd) td{background-color:rgba(0,0,0,.02)}.simpay-system-status-report-panel dl{margin:0;padding:0}.simpay-system-status-report-panel dt{float:left;font-style:italic;margin:0 4px 0 0}.simpay-system-status-report-panel dd{margin:0}.simpay-system-status-report-panel mark{background-color:transparent;font-weight:700}.simpay-system-status-report-panel mark.ok{color:green}.simpay-system-status-report-panel mark.error{color:red}.simpay-system-status-report-panel mark.warning{color:#ffb900}#wpsp-api-keys-row-hide{display:none}.wpsp-stripe-connect{display:inline-block;margin-bottom:1px;background-image:-webkit-linear-gradient(#28a0e5,#015e94);background-image:-moz-linear-gradient(#28a0e5,#015e94);background-image:-ms-linear-gradient(#28a0e5,#015e94);background-image:linear-gradient(#28a0e5,#015e94);-webkit-font-smoothing:antialiased;border:0;padding:1px;height:30px;text-decoration:none;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-moz-box-shadow:0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 0 rgba(0,0,0,.2);cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.wpsp-stripe-connect span{display:block;position:relative;padding:0 12px 0 44px;height:30px;background:#1275ff;background-image:-webkit-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-moz-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:-ms-linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);background-image:linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4);font-size:14px;line-height:30px;color:#fff;font-weight:700;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;text-shadow:0 -1px 0 rgba(0,0,0,.2);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.25);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25);box-shadow:inset 0 1px 0 rgba(255,255,255,.25);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.wpsp-stripe-connect span:before{content:'';display:block;position:absolute;left:11px;top:50%;width:23px;height:24px;margin-top:-12px;background-repeat:no-repeat;background-size:23px 24px}.wpsp-stripe-connect:active{background:#005d93}.wpsp-stripe-connect:active span{color:#eee;background:#008cdd;background-image:-webkit-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-moz-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:-ms-linear-gradient(#008cdd,#008cdd 85%,#239adf);background-image:linear-gradient(#008cdd,#008cdd 85%,#239adf);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1)}.wpsp-stripe-connect span:before,.wpsp-stripe-connect.blue span:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9og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K6fAw+gXiATfdffmjeaUgc1UdpdWplsCooQBrEnqUw82dhdnjit/Vxc4f59tP3DRjzJvYteqrl4rmNlJIfrOwpgNklesDRNQBCHYtQAQqD2CgACNjHAJnG1EyfV/S67fZiJB5t2OGEe4n7L3fS4fpEv/2hUEATfoPbuam5v8N7nps70YTbAAAAAElFTkSuQmCC)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.wpsp-stripe-connect span:before,.wpsp-stripe-connect.blue span:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAYAAABuZUjcAAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw+A6t0vmv4+AOQLAWjt++p7GLJ5SZdIRC5WVvn5+ZYCPtdSVtDP6386fPb8e/jqPEvZeZ9rx/Thp3KkWRKmrKjcnKwcqZiZK+Jw+UyL/x7ifx34VVpf5WEeyU/li/lC9KgYdMoEwjS03UK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IxtVwwKExijB5KFuBYIg1cy8dx0dTQ/yQVc78yBXMIqJ5i/VvvkqHdSjXuM/THKy7w2LQJ6fpJms38QiHGvlzBt+RwJv2JQ2elbjyRtjIi1AIRMAsKPuQduHVzr2YW+kIBE5BTwOzzxLKOiMX8QVuWh00IpqD+S0WHtLlzefpLBOZo/IYvEqQPnTX5dxmy4xookqaCjRuT4mMi8g3bxs2KCkj3GFj4+QSzA0RkeskU8iCJeUiBDv09Jt8OPEV6k7DlP3gxxh/dAPymPh/Kf5d897dIOd9P7H8oEd4G1JV8wPGbRadx52sgLmrRAZ99EZ5+LZgV+v+4Llrg/wX6HRCxgvzAAwAAAABJRU5ErkJggg==)}}
  • stripe/trunk/assets/css/admin.scss

    r1851310 r2051367  
    88#simpay-global-settings {
    99
    10     margin-right: 310px;
     10    /* Should be 40px more than #simpay-settings-sidebar-right below. */
     11    margin-right: 350px;
    1112
    1213    // Remove right margin for sidebar promo on mobile.
     
    3435
    3536        float: right;
    36         width: 270px;
    37         margin-right: -290px;
     37
     38        /* Move width down to 270px if extra space not needed. */
     39        width: 310px;
     40        /* margin-right should be negative of width and subtract another 20px. */
     41        margin-right: -330px;
    3842
    3943        // Move sidebar promo below other settings on mobile.
     
    210214            width: 100%;
    211215
     216            &:last-of-type {
     217                margin-bottom: 20px;
     218            }
     219
    212220            thead th {
    213221                border-bottom: 1px solid #eee;
     
    283291        }
    284292
    285         // WP core's "regular-text" class is 25em width.
     293        // In lieu of .simpay-large-text, use
     294        // WP core's "regular-text" class, which is 25em width.
    286295
    287296    } // end .simpay-field
     
    352361    .simpay-docs-link-wrap {
    353362
     363        position: absolute;
     364        right: 0;
     365        bottom: 0;
    354366        color: #666;
    355         float: right;
    356367        font-size: 13px;
    357368        font-style: italic;
     
    473484
    474485}
     486
     487/*
     488 * Stripe Connect
     489 */
     490
     491 #wpsp-api-keys-row-hide {
     492  display:none;
     493 }
     494 
     495.wpsp-stripe-connect {
     496    display: inline-block;
     497    margin-bottom: 1px;
     498
     499    background-image: -webkit-linear-gradient(#28A0E5, #015E94);
     500    background-image: -moz-linear-gradient(#28A0E5, #015E94);
     501    background-image: -ms-linear-gradient(#28A0E5, #015E94);
     502    background-image: linear-gradient(#28A0E5, #015E94);
     503
     504    -webkit-font-smoothing: antialiased;
     505    border: 0;
     506    padding: 1px;
     507    height: 30px;
     508    text-decoration: none;
     509
     510    -moz-border-radius: 4px;
     511    -webkit-border-radius: 4px;
     512    border-radius: 4px;
     513
     514    -moz-box-shadow: 0 1px 0 rgba(0,0,0,0.2);
     515    -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
     516    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
     517
     518    cursor: pointer;
     519
     520    -moz-user-select: none;
     521    -webkit-user-select: none;
     522    -ms-user-select: none;
     523    user-select: none;
     524
     525    span {
     526        display: block;
     527        position: relative;
     528        padding: 0 12px 0 44px;
     529        height: 30px;
     530
     531        background: #1275FF;
     532        background-image: -webkit-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4);
     533        background-image: -moz-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4);
     534        background-image: -ms-linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4);
     535        background-image: linear-gradient(#7DC5EE, #008CDD 85%, #30A2E4);
     536
     537        font-size: 14px;
     538        line-height: 30px;
     539        color: white;
     540        font-weight: bold;
     541        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
     542        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
     543
     544        -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
     545        -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
     546        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
     547
     548        -moz-border-radius: 3px;
     549        -webkit-border-radius: 3px;
     550        border-radius: 3px;
     551
     552        &:before {
     553            content: '';
     554            display: block;
     555            position: absolute;
     556            left: 11px;
     557            top: 50%;
     558            width: 23px;
     559            height: 24px;
     560            margin-top: -12px;
     561            background-repeat: no-repeat;
     562            background-size: 23px 24px;
     563        }
     564    }
     565
     566    &:active {
     567        background: #005D93;
     568
     569        span {
     570            color: #EEE;
     571
     572            background: #008CDD;
     573            background-image: -webkit-linear-gradient(#008CDD, #008CDD 85%, #239ADF);
     574            background-image: -moz-linear-gradient(#008CDD, #008CDD 85%, #239ADF);
     575            background-image: -ms-linear-gradient(#008CDD, #008CDD 85%, #239ADF);
     576            background-image: linear-gradient(#008CDD, #008CDD 85%, #239ADF);
     577
     578            -moz-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
     579            -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
     580            box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
     581        }
     582    }
     583
     584    span:before,
     585    &.blue span:before {
     586        background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw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opRcacjPW5+43rDTpNSKQ8QKZAEg7xmPCTs/O27uGJgXuNbW0pxyvLfTmAEBzthEsFZLxRvPdi5rpYo2cmUiQJDA4IVeo0obGdlvGfXUPj0Sym2zPuHxvzcWjDyVupJ/YYizKTGNjLw/HiduNTAqIRIUJ6Vpp+ky8bCSFgwQ2xgkGxFi1ioNWEBGuJB31gbLIv/2pd7SpFoGxtpCYkLSEq4ptlzIYFO7tc7w0TKkeEYg5ADnrWkkYhD8s26GPq3nW0WKxTptftPYBI4Mj3O2fHvKNZBMVSDmMwarXNjDkSF3d5kExZeiCr8M2VI+VFu9IvsPcYtzAvkfoEZkEEE45jMppq3ppbCNPFIY1nD1cpo07lbMmvOXeoDCF8BLKy9uUAAjDkBh+c6bz78mNtVVP7MwET7JBnqb4xXpdWVpC1OVzWn+ELHLCsneX/s7rkRWl1463cy1U3WroG21jhCGKJXPOtKQnpAuENvsAppgDB3TcDVIrpDHbK5Kd+y7W8iodNybHh22rOHyxUK+UaMYjZaoyp25rYL54TSihSKmwZ14v3lc3ZFxdbeywjn/tGJnkmzrydX1ApxOEACKymmXLYfXVpi1JMEOGxPi1ep18doY4r2J7uFumQQ9yGf01bMcZW8dpyc0oIjxxpuC5wuUDX+ovWrnYeg3aXvdLIqnmOvXPsfH6uA5YbTb1DX8ofvTLzTy6ZV4K6fAw+gXiATfdffmjeaUgc1UdpdWplsCooQBrEnqUw82dhdnjit/Vxc4f59tP3DRjzJvYteqrl4rmNlJIfrOwpgNklesDRNQBCHYtQAQqD2CgACNjHAJnG1EyfV/S67fZiJB5t2OGEe4n7L3fS4fpEv/2hUEATfoPbuam5v8N7nps70YTbAAAAAElFTkSuQmCC");
     587    }
     588}
     589
     590@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
     591only screen and (min--moz-device-pixel-ratio: 1.5),
     592only screen and (min-device-pixel-ratio: 1.5) {
     593    .wpsp-stripe-connect span:before, .wpsp-stripe-connect.blue span:before {
     594        background-image: url("data:image/png;base64,iVBORw0KG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ZgV+v+4Llrg/wX6HRCxgvzAAwAAAABJRU5ErkJggg==");
     595    }
     596}
     597
     598/* End of Stripe Connect */
  • stripe/trunk/assets/css/chosen.min.css

    r1967366 r2051367  
    1 /*! WP Simple Pay Lite for Stripe - 2.0.12
     1/*! WP Simple Pay Lite for Stripe - 2.1.0
    22 * https://wpsimplepay.com/
    3  * Copyright (c) Moonstone Media Group 2018
     3 * Copyright (c) Moonstone Media Group 2019
    44 * Licensed GPLv2+ */
    55
  • stripe/trunk/assets/css/public.css

    r1851310 r2051367  
    88
    99.simpay-form-control {
    10   margin-bottom: 15px;
    11   *zoom: 1; }
     10  *zoom: 1;
     11  margin-bottom: 15px; }
    1212  .simpay-form-control::before, .simpay-form-control::after {
    1313    content: " ";
     
    1919    margin: 0; }
    2020  .simpay-form-control ul {
    21     margin-bottom: 0.5em; }
    22   .simpay-form-control ul li {
    23     list-style-type: none; }
     21    margin: 0 0 0.5em 0; }
     22    .simpay-form-control ul li {
     23      list-style-type: none; }
     24      .simpay-form-control ul li label {
     25        display: block;
     26        margin: 0 0 0.5em 0; }
     27        .simpay-form-control ul li label input[type="radio"], .simpay-form-control ul li label input[type="checkbox"] {
     28          margin-right: 0.5em; }
    2429  .simpay-form-control label {
    25     cursor: pointer; }
     30    cursor: pointer;
     31    display: block; }
    2632  .simpay-form-control .simpay-field-wrap {
    2733    *zoom: 1; }
     
    3238      clear: both; }
    3339
    34 .simpay-test-mode-badge-container {
    35   padding-top: 10px; }
    36   .simpay-test-mode-badge-container .simpay-test-mode-badge {
    37     background-color: #f7e633;
    38     color: #363636;
    39     border-radius: 5px;
    40     font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    41     font-weight: 700;
    42     font-size: 11px;
    43     text-transform: uppercase;
    44     padding: 5px 9px; }
     40.simpay-errors {
     41  color: #eb1c26;
     42  margin-bottom: 15px; }
    4543
    46 .simpay-error {
    47   *zoom: 1;
    48   background-color: #f2dede;
    49   border: 1px solid #ebcccc;
    50   border-radius: .25rem;
    51   color: #a94442;
    52   margin: 1rem 0;
    53   padding: .75rem 1.25rem; }
    54   .simpay-error::before, .simpay-error::after {
    55     content: " ";
    56     display: table; }
    57   .simpay-error::after {
    58     clear: both; }
    59   .simpay-error .simpay-error-item {
    60     margin: 0; }
     44.simpay-test-mode-badge-container .simpay-test-mode-badge {
     45  background-color: #f7e633;
     46  color: #333;
     47  border-radius: 5px;
     48  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
     49  font-weight: 700;
     50  font-size: 11px;
     51  text-transform: uppercase;
     52  padding: 5px 9px; }
  • stripe/trunk/assets/css/public.min.css

    r1967366 r2051367  
    1 /*! WP Simple Pay Lite for Stripe - 2.0.12
     1/*! WP Simple Pay Lite for Stripe - 2.1.0
    22 * https://wpsimplepay.com/
    3  * Copyright (c) Moonstone Media Group 2018
     3 * Copyright (c) Moonstone Media Group 2019
    44 * Licensed GPLv2+ */
    55
    6 .simpay-clearfix::after,.simpay-clearfix::before{content:" ";display:table}.simpay-clearfix::after{clear:both}.simpay-form-control{margin-bottom:15px}.simpay-form-control::after,.simpay-form-control::before{content:" ";display:table}.simpay-form-control::after{clear:both}.simpay-form-control p{padding:0;margin:0}.simpay-form-control ul{margin-bottom:.5em}.simpay-form-control ul li{list-style-type:none}.simpay-form-control label{cursor:pointer}.simpay-form-control .simpay-field-wrap::after,.simpay-form-control .simpay-field-wrap::before{content:" ";display:table}.simpay-form-control .simpay-field-wrap::after{clear:both}.simpay-test-mode-badge-container{padding-top:10px}.simpay-test-mode-badge-container .simpay-test-mode-badge{background-color:#f7e633;color:#363636;border-radius:5px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:700;font-size:11px;text-transform:uppercase;padding:5px 9px}.simpay-error{background-color:#f2dede;border:1px solid #ebcccc;border-radius:.25rem;color:#a94442;margin:1rem 0;padding:.75rem 1.25rem}.simpay-error::after,.simpay-error::before{content:" ";display:table}.simpay-error::after{clear:both}.simpay-error .simpay-error-item{margin:0}
     6.simpay-clearfix::after,.simpay-clearfix::before{content:" ";display:table}.simpay-clearfix::after{clear:both}.simpay-form-control{margin-bottom:15px}.simpay-form-control::after,.simpay-form-control::before{content:" ";display:table}.simpay-form-control::after{clear:both}.simpay-form-control p{padding:0;margin:0}.simpay-form-control ul{margin:0 0 .5em 0}.simpay-form-control ul li{list-style-type:none}.simpay-form-control ul li label{display:block;margin:0 0 .5em 0}.simpay-form-control ul li label input[type=checkbox],.simpay-form-control ul li label input[type=radio]{margin-right:.5em}.simpay-form-control label{cursor:pointer;display:block}.simpay-form-control .simpay-field-wrap::after,.simpay-form-control .simpay-field-wrap::before{content:" ";display:table}.simpay-form-control .simpay-field-wrap::after{clear:both}.simpay-errors{color:#eb1c26;margin-bottom:15px}.simpay-test-mode-badge-container .simpay-test-mode-badge{background-color:#f7e633;color:#333;border-radius:5px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:700;font-size:11px;text-transform:uppercase;padding:5px 9px}
  • stripe/trunk/assets/css/public.scss

    r1785812 r2051367  
    1 @import '_mixins';
     1@import 'mixins';
     2@import 'variables';
    23
    34.simpay-form-control {
    4 
     5    @include clearfix();
    56    margin-bottom: 15px;
    6     @include clearfix();
    77
    88    p {
     
    1212
    1313    ul {
    14         margin-bottom: 0.5em;
    15     }
     14        margin: 0 0 0.5em 0;
    1615
    17     ul li {
    18         list-style-type: none;
     16        li {
     17            list-style-type: none;
     18
     19            label {
     20                display: block;
     21                margin: 0 0 0.5em 0;
     22
     23                input[type="radio"], input[type="checkbox"] {
     24                    margin-right: 0.5em;
     25                }
     26            }
     27        }
    1928    }
    2029
    2130    label {
    2231        cursor: pointer;
     32        display: block;
    2333    }
    2434
     
    2939}
    3040
     41// Error messages container
     42
     43.simpay-errors {
     44    //@include clearfix();
     45    color: $error-text-color;
     46    margin-bottom: 15px;
     47}
     48
    3149// Test mode badge
    3250
    3351.simpay-test-mode-badge-container {
    34     padding-top: 10px;
    3552
    3653    .simpay-test-mode-badge {
    3754        background-color: #f7e633;
    38         color: #363636;
     55        color: $base-text-color;
    3956        border-radius: 5px;
    4057        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
     
    4562    }
    4663}
    47 
    48 // Error messages
    49 // Styles taken from Bootstrap
    50 // http://getbootstrap.com/components/#alerts & https://v4-alpha.getbootstrap.com/components/alerts/
    51 
    52 .simpay-error {
    53     @include clearfix();
    54 
    55     background-color: #f2dede;
    56     border: 1px solid #ebcccc;
    57     border-radius: .25rem;
    58     color: #a94442;
    59     margin: 1rem 0;
    60     padding: .75rem 1.25rem;
    61 
    62     .simpay-error-item {
    63         margin: 0;
    64     }
    65 }
  • stripe/trunk/assets/js/admin.js

    r1851310 r2051367  
    33var spAdmin = {};
    44
    5 (function( $ ) {
     5( function( $ ) {
    66    'use strict';
    77
     
    2525            // Init admin metabox tab clicks.
    2626            this.handleMetaboxTabClick();
     27
     28            this.stripeConnect();
    2729
    2830            // Init internal link to tab clicks.
     
    3739            } );
    3840
    39             // Section toggles
    40             spFormSettings.find( '.simpay-panel-field' ).on( 'click.simpaySectionToggle', '.simpay-section-toggle', function( e ) {
     41            // Checkbox section toggles
     42            spFormSettings.find( '.simpay-panel-field' ).on( 'change.simpaySectionToggle', '.simpay-section-toggle', function( e ) {
    4143                spAdmin.initSectionToggle( $( this ) );
    4244            } );
     
    5456            // Handle the submit when they press enter
    5557            body.find( '#post' ).on( 'keypress.simpaySubmitOnEnter', function( e ) {
    56                 spAdmin.handleSubmitOnEnter( $( this ) );
     58                spAdmin.handleSubmitOnEnter( $( this ), e );
    5759            } );
    5860
     
    6668            } );
    6769
     70            // Trigger focus out (blur) for all amount input fields on page load.
     71            // Should only need for admin. Used to be in shared.js.
     72            body.find( '.simpay-amount-input' ).trigger( 'blur.validateAndUpdateAmount' );
     73
    6874            body.trigger( 'simpayAdminInit' );
    6975        },
    7076
    71         handleSubmitOnEnter: function( elem ) {
     77        // TODO This working or needed now?
     78
     79        handleSubmitOnEnter: function( el, e ) {
    7280
    7381            var keyCode,
     
    7785
    7886            // Get the keycode
    79             keyCode = ( event.keyCode ? event.keyCode : event.which );
     87            keyCode = ( e.keyCode ? e.keyCode : e.which );
    8088
    8189            // Check if the enter button was pressed
    8290            if ( 13 === keyCode ) {
    8391
    84                 form = elem.closest( 'form' );
     92                form = el.closest( 'form' );
    8593
    8694                draftButton = form.find( '#save-post' );
     
    96104        },
    97105
    98         handlePreviewButton: function( elem, e ) {
     106        handlePreviewButton: function( el, e ) {
    99107
    100108            var prevFormAction,
     
    104112
    105113            // Get the form this button belongs to
    106             formElem = elem.closest( 'form' );
     114            formElem = el.closest( 'form' );
    107115
    108116            // Get the form action we need to fall back to
     
    110118
    111119            // Temporarily change the action of our form to point to the preview page
    112             formElem.attr( 'action', elem.data( 'action' ) );
     120            formElem.attr( 'action', el.data( 'action' ) );
    113121            formElem.attr( 'target', '_blank' );
    114122
     
    120128        },
    121129
    122         showSpinner: function( elem ) {
    123             elem.parent().find( '.spinner' ).css( 'visibility', 'visible' );
     130        showSpinner: function( el ) {
     131            el.parent().find( '.spinner' ).css( 'visibility', 'visible' );
    124132        },
    125133
     
    242250        },
    243251
     252        stripeConnect: function() {
     253            $( '#simpay-settings-keys-mode-test-mode' ).closest( '.form-table' ).next().hide().next().hide();
     254            $( '#wpsp-api-keys-row-reveal a' ).click( function() {
     255                $( '#simpay-settings-keys-mode-test-mode' ).closest( '.form-table' ).next().show().next().show();
     256                $( '#wpsp-api-keys-row-hide' ).show();
     257                $( this ).parent().hide();
     258            } );
     259            $( '#wpsp-api-keys-row-hide a' ).click( function() {
     260                $( '#simpay-settings-keys-mode-test-mode' ).closest( '.form-table' ).next().hide().next().hide();
     261                $( '#wpsp-api-keys-row-reveal' ).show();
     262                $( this ).parent().hide();
     263            } );
     264        },
     265
    244266        // Handle links within tab content to other tabs.
    245267        // When one is clicked, trigger the corresponding tab link click.
    246         handleInternalLinkToTabClicks: function( elem ) {
    247 
    248             var tabToShowId = elem.data( 'show-tab' ),
     268        handleInternalLinkToTabClicks: function( el ) {
     269
     270            var tabToShowId = el.data( 'show-tab' ),
    249271                tabToShowLinkEl = body.find( '.' + tabToShowId + '-tab a' );
    250272
     
    252274        },
    253275
    254         initSectionToggle: function( elem ) {
    255 
    256             var showElem = elem.data( 'show' );
    257 
    258             if ( elem.is( ':checked' ) ) {
    259                 elem.closest( '.simpay-panel-field' ).parent().find( showElem ).show();
     276        initSectionToggle: function( el ) {
     277
     278            // TODO DRY
     279            //var sectionElem = el.closest( '.simpay-panel-field' ).parent().find( showElem );
     280
     281            var showElem = el.data( 'show' );
     282
     283            if ( el.is( ':checked' ) ) {
     284                el.closest( '.simpay-panel-field' ).parent().find( showElem ).show();
    260285            } else {
    261                 elem.closest( '.simpay-panel-field' ).parent().find( showElem ).hide();
     286                el.closest( '.simpay-panel-field' ).parent().find( showElem ).hide();
    262287            }
    263288        },
    264289
    265         initMultiToggle: function( elem ) {
    266 
    267             var selectedId = elem.attr( 'id' );
     290        initMultiToggle: function( el ) {
     291
     292            var selectedId = el.attr( 'id' );
    268293
    269294            // Hide all options first. This allows us to show multiple sections with the classes
    270             elem.closest( '.simpay-field-radios-inline' ).find( 'input[type="radio"]' ).each( function( currIndex ) {
     295            el.closest( '.simpay-field-radios-inline' ).find( 'input[type="radio"]' ).each( function( i ) {
    271296
    272297                // $( this ) in this context is the current iteration, not what is set to elem. so we need to keep it here
     
    280305
    281306    $( document ).ready( function( $ ) {
    282 
    283307        spAdmin.init();
    284308    } );
  • stripe/trunk/assets/js/admin.min.js

    r1967366 r2051367  
    1 /*! WP Simple Pay Lite for Stripe - 2.0.12
     1/*! WP Simple Pay Lite for Stripe - 2.1.0
    22 * https://wpsimplepay.com/
    3  * Copyright (c) Moonstone Media Group 2018
     3 * Copyright (c) Moonstone Media Group 2019
    44 * Licensed GPLv2+ */
    55
    6 var spAdmin={};!function(s){"use strict";var n,t;spAdmin={init:function(){n=s(document.body),t=n.find("#simpay-form-settings"),this.setupChosen(),this.addMediaFields(),this.handleMetaboxTabClick(),t.on("click.simpayTabLink",".simpay-tab-link",function(i){i.preventDefault(),spAdmin.handleInternalLinkToTabClicks(s(this))}),t.on("click.simpayImagePreview",".simpay-remove-image-preview",function(i){spAdmin.handleRemoveImagePreviewClick(i)}),t.find(".simpay-panel-field").on("click.simpaySectionToggle",".simpay-section-toggle",function(i){spAdmin.initSectionToggle(s(this))}),n.find(".simpay-button").on("click.simpayShowSpinner",function(i){spAdmin.showSpinner(s(this))}),n.find("#simpay-preview-button").on("click.simpayPreviewButton",function(i){spAdmin.handlePreviewButton(s(this),i)}),n.find("#post").on("keypress.simpaySubmitOnEnter",function(i){spAdmin.handleSubmitOnEnter(s(this))}),t.find('.simpay-multi-toggle input[type="radio"]:checked').each(function(){spAdmin.initMultiToggle(s(this))}),t.on("change.simpayMultiToggle",'.simpay-multi-toggle input[type="radio"]',function(){spAdmin.initMultiToggle(s(this))}),n.trigger("simpayAdminInit")},handleSubmitOnEnter:function(i){var e,n,t;13===(event.keyCode?event.keyCode:event.which)&&(n=(e=i.closest("form")).find("#save-post"),t=e.find("#publish"),0<n.length?n.click():t.click())},handlePreviewButton:function(i,e){var n,t;e.preventDefault(),n=(t=i.closest("form")).attr("action"),t.attr("action",i.data("action")),t.attr("target","_blank"),t.submit(),t.attr("action",n),t.attr("target","")},showSpinner:function(i){i.parent().find(".spinner").css("visibility","visible")},handleRemoveImagePreviewClick:function(i){i.preventDefault(),t.find(".simpay-image-preview-wrap").hide(),t.find("#_image_url").val("")},addMediaFields:function(){var t;s(".simpay-media-uploader").on("click",function(i){i.preventDefault(),window.simpayMediaUploaderInputField=s(this),t||(t=wp.media.frames.file_frame=wp.media({title:spGeneral.i18n.mediaTitle,button:{text:spGeneral.i18n.mediaButtonText},multiple:!1})).on("select",function(){var i=t.state().get("selection").first().toJSON(),e=window.simpayMediaUploaderInputField.prev(),n="id"===e.data("fvalue")?i.id:i.url;s(".simpay-image-preview-wrap").show(),s(".simpay-image-preview").prop("src",n),e.val(n)}),t.open()})},setupChosen:function(){var i=s(".simpay-chosen-select, .simpay-chosen-search");i.chosen({disable_search_threshold:20}),i.chosen()},handleMetaboxTabClick:function(){var i=s("ul.simpay-tabs a"),t=s("div.simpay-panel"),a=i.parents("li"),e={};i.on("click",function(i){var e=s(this).parent(),n=s(s(this).attr("href"));location.hash=s(this).attr("href"),i.preventDefault(),a.removeClass("active"),e.addClass("active"),t.addClass("simpay-panel-hidden"),n.removeClass("simpay-panel-hidden"),i.stopPropagation()}),location.hash.length&&(setTimeout(function(){window.scrollTo(0,0)},1),(e=s('ul.simpay-tabs a[href="'+location.hash+'"]')).length&&e.click())},handleInternalLinkToTabClicks:function(i){var e=i.data("show-tab");n.find("."+e+"-tab a").click()},initSectionToggle:function(i){var e=i.data("show");i.is(":checked")?i.closest(".simpay-panel-field").parent().find(e).show():i.closest(".simpay-panel-field").parent().find(e).hide()},initMultiToggle:function(i){var e=i.attr("id");i.closest(".simpay-field-radios-inline").find('input[type="radio"]').each(function(i){t.find(".toggle-"+s(this).attr("id")).hide()}),t.find(".toggle-"+e).show()}},s(document).ready(function(i){spAdmin.init()})}(jQuery);
     6var spAdmin={};!function(s){"use strict";var t,n;spAdmin={init:function(){t=s(document.body),n=t.find("#simpay-form-settings"),this.setupChosen(),this.addMediaFields(),this.handleMetaboxTabClick(),this.stripeConnect(),n.on("click.simpayTabLink",".simpay-tab-link",function(i){i.preventDefault(),spAdmin.handleInternalLinkToTabClicks(s(this))}),n.on("click.simpayImagePreview",".simpay-remove-image-preview",function(i){spAdmin.handleRemoveImagePreviewClick(i)}),n.find(".simpay-panel-field").on("change.simpaySectionToggle",".simpay-section-toggle",function(i){spAdmin.initSectionToggle(s(this))}),t.find(".simpay-button").on("click.simpayShowSpinner",function(i){spAdmin.showSpinner(s(this))}),t.find("#simpay-preview-button").on("click.simpayPreviewButton",function(i){spAdmin.handlePreviewButton(s(this),i)}),t.find("#post").on("keypress.simpaySubmitOnEnter",function(i){spAdmin.handleSubmitOnEnter(s(this),i)}),n.find('.simpay-multi-toggle input[type="radio"]:checked').each(function(){spAdmin.initMultiToggle(s(this))}),n.on("change.simpayMultiToggle",'.simpay-multi-toggle input[type="radio"]',function(){spAdmin.initMultiToggle(s(this))}),t.find(".simpay-amount-input").trigger("blur.validateAndUpdateAmount"),t.trigger("simpayAdminInit")},handleSubmitOnEnter:function(i,e){var t,n,a;13===(e.keyCode?e.keyCode:e.which)&&(n=(t=i.closest("form")).find("#save-post"),a=t.find("#publish"),0<n.length?n.click():a.click())},handlePreviewButton:function(i,e){var t,n;e.preventDefault(),t=(n=i.closest("form")).attr("action"),n.attr("action",i.data("action")),n.attr("target","_blank"),n.submit(),n.attr("action",t),n.attr("target","")},showSpinner:function(i){i.parent().find(".spinner").css("visibility","visible")},handleRemoveImagePreviewClick:function(i){i.preventDefault(),n.find(".simpay-image-preview-wrap").hide(),n.find("#_image_url").val("")},addMediaFields:function(){var n;s(".simpay-media-uploader").on("click",function(i){i.preventDefault(),window.simpayMediaUploaderInputField=s(this),n||(n=wp.media.frames.file_frame=wp.media({title:spGeneral.i18n.mediaTitle,button:{text:spGeneral.i18n.mediaButtonText},multiple:!1})).on("select",function(){var i=n.state().get("selection").first().toJSON(),e=window.simpayMediaUploaderInputField.prev(),t="id"===e.data("fvalue")?i.id:i.url;s(".simpay-image-preview-wrap").show(),s(".simpay-image-preview").prop("src",t),e.val(t)}),n.open()})},setupChosen:function(){var i=s(".simpay-chosen-select, .simpay-chosen-search");i.chosen({disable_search_threshold:20}),i.chosen()},handleMetaboxTabClick:function(){var i=s("ul.simpay-tabs a"),n=s("div.simpay-panel"),a=i.parents("li"),e={};i.on("click",function(i){var e=s(this).parent(),t=s(s(this).attr("href"));location.hash=s(this).attr("href"),i.preventDefault(),a.removeClass("active"),e.addClass("active"),n.addClass("simpay-panel-hidden"),t.removeClass("simpay-panel-hidden"),i.stopPropagation()}),location.hash.length&&(setTimeout(function(){window.scrollTo(0,0)},1),(e=s('ul.simpay-tabs a[href="'+location.hash+'"]')).length&&e.click())},stripeConnect:function(){s("#simpay-settings-keys-mode-test-mode").closest(".form-table").next().hide().next().hide(),s("#wpsp-api-keys-row-reveal a").click(function(){s("#simpay-settings-keys-mode-test-mode").closest(".form-table").next().show().next().show(),s("#wpsp-api-keys-row-hide").show(),s(this).parent().hide()}),s("#wpsp-api-keys-row-hide a").click(function(){s("#simpay-settings-keys-mode-test-mode").closest(".form-table").next().hide().next().hide(),s("#wpsp-api-keys-row-reveal").show(),s(this).parent().hide()})},handleInternalLinkToTabClicks:function(i){var e=i.data("show-tab");t.find("."+e+"-tab a").click()},initSectionToggle:function(i){var e=i.data("show");i.is(":checked")?i.closest(".simpay-panel-field").parent().find(e).show():i.closest(".simpay-panel-field").parent().find(e).hide()},initMultiToggle:function(i){var e=i.attr("id");i.closest(".simpay-field-radios-inline").find('input[type="radio"]').each(function(i){n.find(".toggle-"+s(this).attr("id")).hide()}),n.find(".toggle-"+e).show()}},s(document).ready(function(i){spAdmin.init()})}(jQuery);
  • stripe/trunk/assets/js/public.js

    r1915991 r2051367  
    33var simpayApp = {};
    44
    5 (function( $ ) {
     5( function( $ ) {
    66    'use strict';
    77
     
    1616        spFormData: {},
    1717
    18         // Stripe Data?
    19         spStripeData: {},
    20 
    2118        init: function() {
    2219
     
    2421            body = $( document.body );
    2522
    26             this.spFormElList = body.find( '.simpay-checkout-form' );
    27 
    28             this.spFormElList.each( function() {
     23            simpayApp.spFormElList = body.find( '.simpay-checkout-form' );
     24
     25            simpayApp.spFormElList.each( function() {
    2926
    3027                var spFormElem = $( this );
    31                 simpayApp.processForm( spFormElem );
    32 
    33                 body.trigger( 'simpayProcessFormElements', [ spFormElem ] );
     28                simpayApp.setupCoreForm( spFormElem );
     29
     30                body.trigger( 'simpaySetupCoreForm', [ spFormElem ] );
    3431            } );
    35 
    36             body.trigger( 'simpayLoaded' );
    37         },
    38 
    39         processForm: function( spFormElem ) {
    40 
    41             // Set the form ID
     32        },
     33
     34        // Does this payment form use the Stripe Checkout overlay?
     35        isStripeCheckoutForm: function( formData ) {
     36
     37            return ( undefined === formData.formDisplayType ) || ( 'stripe_checkout' === formData.formDisplayType );
     38        },
     39
     40        setupCoreForm: function( spFormElem ) {
     41
    4242            var formId = spFormElem.data( 'simpay-form-id' );
    4343
    44             // Grab the localized data for this form ID
     44            // Grab the localized data for this form ID.
    4545            var localizedFormData = simplePayForms[ formId ];
    4646
    47             // Set a local variable to hold all of the form information.
    48             var formData = this.spFormData[ formId ];
    49 
    50             // Variable to hold the Stripe configuration
    51             var stripeHandler = null;
    52 
    5347            // Set formData array index of the current form ID to match the localized data passed over for form settings.
    54             formData = $.extend( {},  localizedFormData.form.integers, localizedFormData.form.bools, localizedFormData.form.strings );
    55 
     48            var formData = $.extend( {}, localizedFormData.form.bools, localizedFormData.form.integers, localizedFormData.form.i18n, localizedFormData.form.strings );
     49
     50            // Set form ID from data attribute.
    5651            formData.formId = formId;
    5752
    58             // Set a finalAmount setting so that we can perform all the actions on this. That way if we need to reverse anything we leave the base amount untouched and can revert to it.
     53            // Set a finalAmount setting so that we can perform all the actions on this.
     54            // That way if we need to reverse anything we leave the base amount untouched and can revert to it.
     55            // .amount & .finalAmount prop values = 1 for $1.00 USD, 100 if a zero decimal currency.
    5956            formData.finalAmount = formData.amount;
    6057
    61             // Set the default quantity to 1
     58            // Set the default quantity to 1.
    6259            formData.quantity = 1;
    6360
     
    6663            formData.stripeParams = $.extend( {}, localizedFormData.stripe.strings, localizedFormData.stripe.bools );
    6764
    68             // Set a fallback button label
    69             formData.oldPanelLabel = undefined !== formData.stripeParams.panelLabel ? formData.stripeParams.panelLabel : '';
    70 
    71             body.trigger( 'simpayFormVarsInitialized', [ spFormElem, formData ] );
    72 
    73             // Stripe Checkout handler configuration.
    74             // Only token callback function set here. All other params set in stripeParams.
    75             // Chrome on iOS needs handler set before click event or else checkout won't open in a new tab.
    76             // See "How do I prevent the Checkout popup from being blocked?"
    77             // Full docs: https://stripe.com/docs/checkout#integration-custom
    78             stripeHandler = StripeCheckout.configure( {
    79 
    80                 // Key param MUST be sent here instead of stripeHandler.open(). Discovered 8/11/16.
    81                 key: formData.stripeParams.key,
    82 
    83                 token: handleStripeToken,
    84 
    85                 opened: function() {
    86                 },
    87                 closed: function() {
     65            // Set a fallback button label.
     66            formData.oldPanelLabel = ( undefined !== formData.stripeParams.panelLabel ) ? formData.stripeParams.panelLabel : '';
     67
     68            // Set button element class that will trigger payment form submit.
     69            // Different for Pro custom forms implementation.
     70            formData.submitBtnClass = 'simpay-payment-btn';
     71
     72            body.trigger( 'simpayCoreFormVarsInitialized', [ spFormElem, formData ] );
     73
     74            if ( simpayApp.isStripeCheckoutForm( formData ) ) {
     75                simpayApp.setupStripeCheckout( spFormElem, formData );
     76            }
     77
     78            simpayApp.spFormData[ formId ] = formData;
     79
     80            body.trigger( 'simpayBindCoreFormEventsAndTriggers', [ spFormElem, formData ] );
     81        },
     82
     83        setupStripeCheckout: function( spFormElem, formData ) {
     84
     85            var submitBtn = spFormElem.find( '.' + formData.submitBtnClass );
     86
     87            // Variable to hold the Stripe configuration.
     88            var stripeHandler = null;
     89
     90            if ( submitBtn.length ) {
     91
     92                // Stripe Checkout handler configuration.
     93                // Only token callback function set here. All other params set in stripeParams.
     94                // Chrome on iOS needs handler set before click event or else checkout won't open in a new tab.
     95                // See "How do I prevent the Checkout popup from being blocked?"
     96                // Full docs: https://stripe.com/docs/checkout#integration-custom
     97                stripeHandler = StripeCheckout.configure( {
     98
     99                    // Key param MUST be sent here instead of stripeHandler.open().
     100                    key: formData.stripeParams.key,
     101                    token: function( token, args ) {
     102                        handleStripeCheckoutToken( token, args );
     103                    },
     104                    opened: function() {
     105                    },
     106                    closed: function() {
     107                    }
     108                } );
     109            }
     110
     111            /** Form submitted through checkout button click or Enter key. */
     112
     113            function submitCoreForm() {
     114
     115                // Init flag for form validation state.
     116                formData.isValid = true;
     117
     118                // Trigger custom event right before executing payment.
     119                // For Pro version client-side validation and other client-side changes.
     120                spFormElem.trigger( 'simpayBeforeStripePayment', [ spFormElem, formData ] );
     121
     122                // Now check validation state flag before continuing.
     123                // There are no validation checks in the Lite version natively.
     124                // But this is needed for Pro and/or custom code.
     125                if ( !formData.isValid ) {
     126                    return;
    88127                }
    89             } );
    90 
    91             // Internal Strike token callback function for StripeCheckout.configure
    92             function handleStripeToken( token, args ) {
    93 
    94                 // At this point the Stripe Checkout overlay is validated and submitted.
    95                 // Set values to hidden elements to pass via POST when submitting the form for payment.
    96                 spFormElem.find( '.simpay-stripe-token' ).val( token.id );
    97                 spFormElem.find( '.simpay-stripe-email' ).val( token.email );
    98 
    99                 // Handle args
    100                 simpayApp.handleStripeArgs( spFormElem, args );
    101 
    102                 // Disable original payment button and change text for UI feedback while POST-ing to Stripe.
    103                 spFormElem.find( '.simpay-payment-btn' )
     128
     129                simpayApp.setCoreFinalAmount( spFormElem, formData );
     130
     131                // Send the final amount to Stripe params.
     132                // Stripe expects amounts in cents (100 for $1.00 USD / no decimals), so convert here.
     133                formData.stripeParams.amount = spShared.convertToCents( formData.finalAmount );
     134
     135                // Set the same cents value to the hidden input for submitting form for processing.
     136                spFormElem.find( '.simpay-amount' ).val( formData.stripeParams.amount );
     137
     138                stripeHandler.open( formData.stripeParams );
     139            }
     140
     141            /**
     142             * Stripe Checkout token handler
     143             *
     144             * https://stripe.com/docs/checkout#integration-custom
     145             *
     146             * @param token Stripe Token object - https://stripe.com/docs/api#tokens
     147             * @param args Object containing the billing and shipping addresses, if enabled.
     148             */
     149
     150            function handleStripeCheckoutToken( token, args ) {
     151
     152                var submitBtn = spFormElem.find( '.' + formData.submitBtnClass );
     153
     154                // Append hidden inputs to hold Stripe Checkout token values to sumbit with form POST.
     155
     156                $( '<input>' ).attr( {
     157                    type: 'hidden',
     158                    name: 'simpay_stripe_token',
     159                    value: token.id
     160                } ).appendTo( spFormElem );
     161
     162                $( '<input>' ).attr( {
     163                    type: 'hidden',
     164                    name: 'simpay_stripe_email',
     165                    value: token.email
     166                } ).appendTo( spFormElem );
     167
     168                // Handle extra (shipping) args.
     169                if ( args ) {
     170                    simpayApp.handleStripeShippingArgs( spFormElem, args );
     171                }
     172
     173                // Disable original form submit button and change text for UI feedback while POST-ing to Stripe.
     174                submitBtn
    104175                    .prop( 'disabled', true )
    105176                    .find( 'span' )
    106177                    .text( formData.loadingText );
    107178
    108                 // Unbind original form submit trigger before calling again to "reset" it and submit normally.
    109                 spFormElem.unbind( 'submit', [ spFormElem, formData ] );
    110 
     179                // Reset form submit handler to prevent an infinite loop.
     180                // Then finally submit the form.
     181                spFormElem.off( 'submit' );
    111182                spFormElem.submit();
    112183            }
    113184
    114             // Page-level initial payment button clicked. Use over form submit for more control/validation.
    115             spFormElem.find( '.simpay-payment-btn' ).on( 'click.simpayPaymentBtn', function( e ) {
     185            /** Original form submit handler */
     186
     187            spFormElem.on( 'submit', function( e ) {
    116188                e.preventDefault();
    117 
    118                 // Trigger custom event right before executing payment
    119                 spFormElem.trigger( 'simpayBeforeStripePayment', [ spFormElem, formData ] );
    120 
    121                 simpayApp.submitPayment( spFormElem, formData, stripeHandler );
     189                submitCoreForm();
    122190            } );
    123 
    124             this.spFormData[ formId ] = formData;
    125 
    126             /** Event handlers for form elements **/
    127 
    128             body.trigger( 'simpayBindEventsAndTriggers', [ spFormElem, formData ] );
    129         },
    130 
    131         handleStripeArgs: function( spFormElem, args ) {
    132 
    133             // Check and add only the ones that are found
     191        },
     192
     193        // Check & add extra shipping values if found.
     194        handleStripeShippingArgs: function( spFormElem, args ) {
    134195
    135196            if ( args.shipping_name ) {
     
    158219        },
    159220
    160         submitPayment: function( spFormElem, formData, stripeHandler ) {
    161 
    162             simpayApp.setFinalAmount( spFormElem, formData );
    163 
    164             // Add in the final amount to Stripe params
    165             formData.stripeParams.amount = parseInt( formData.finalAmount );
    166 
    167             // If everything checks out then let's open the form
    168             if ( spFormElem.valid() ) {
    169 
    170                 body.trigger( 'simpaySubmitPayment', [ spFormElem, formData ] );
    171 
    172                 spShared.debugLog( 'stripeParams', formData.stripeParams );
    173 
    174                 stripeHandler.open( formData.stripeParams );
    175             }
    176         },
    177 
    178         // Run this to process and get the final amount when the payment button is clicked
    179         setFinalAmount: function( spFormElem, formData ) {
    180 
    181             var finalAmount = formData.amount;
    182 
    183             formData.finalAmount = finalAmount.toFixed( 0 );
    184 
    185             body.trigger( 'simpayFinalizeAmount', [ spFormElem, formData ] );
    186 
    187             // Update hidden amount field for processing
    188             spFormElem.find( '.simpay-amount' ).val( formData.finalAmount );
    189 
    190         },
    191 
    192         formatMoney: function( amount ) {
    193 
    194             // Default format is to the left with no space
    195             var format = '%s%v';
    196             var options;
    197 
    198             // Convert our amount from cents to a formatted amount
    199             amount = simpayApp.convertFromCents( amount );
    200 
    201             // Set currency position based on settings
    202             if ( 'left_space' === spGeneral.strings.currencyPosition ) {
    203 
    204                 //1 Left with a space
    205                 format = '%s %v';
    206             } else if ( 'right' === spGeneral.strings.currencyPosition ) {
    207 
    208                 // Right side no space
    209                 format = '%v%s';
    210             } else if ( 'right_space' === spGeneral.strings.currencyPosition ) {
    211 
    212                 // Right side with space
    213                 format = '%v %s';
    214             }
    215 
    216             options = {
    217                 symbol: spGeneral.strings.currencySymbol,
    218                 decimal: spGeneral.strings.decimalSeparator,
    219                 thousand: spGeneral.strings.thousandSeparator,
    220                 precision: spGeneral.integers.decimalPlaces,
    221                 format: format
    222             };
    223 
    224             return accounting.formatMoney( amount, options );
    225         },
    226 
    227         convertFromCents: function( amount ) {
    228 
    229             if ( spGeneral.booleans.isZeroDecimal ) {
    230                 return amount;
    231             } else {
    232                 return ( amount / 100 ).toFixed( 2 );
    233             }
    234         },
    235 
    236         convertToCents: function( amount ) {
    237 
    238             if ( spGeneral.booleans.isZeroDecimal ) {
    239                 return amount;
    240             } else {
    241                 return ( amount * 100 ).toFixed( 2 );
    242             }
     221        // Set the internal final amount property value as well as the hidden form field.
     222        // .amount & .finalAmount prop values = 1 for $1.00 USD, 100 if a zero decimal currency.
     223        setCoreFinalAmount: function( spFormElem, formData ) {
     224
     225            formData.finalAmount = formData.amount;
     226
     227            // Fire trigger to do additional calculations in Pro.
     228            body.trigger( 'simpayFinalizeCoreAmount', [ spFormElem, formData ] );
    243229        }
    244230    };
    245231
    246232    $( document ).ready( function( $ ) {
    247 
    248233        simpayApp.init();
    249234    } );
  • stripe/trunk/assets/js/public.min.js

    r1967366 r2051367  
    1 /*! WP Simple Pay Lite for Stripe - 2.0.12
     1/*! WP Simple Pay Lite for Stripe - 2.1.0
    22 * https://wpsimplepay.com/
    3  * Copyright (c) Moonstone Media Group 2018
     3 * Copyright (c) Moonstone Media Group 2019
    44 * Licensed GPLv2+ */
    55
    6 var simpayApp={};!function(t){"use strict";var r;simpayApp={spFormElList:{},spFormData:{},spStripeData:{},init:function(){r=t(document.body),this.spFormElList=r.find(".simpay-checkout-form"),this.spFormElList.each(function(){var i=t(this);simpayApp.processForm(i),r.trigger("simpayProcessFormElements",[i])}),r.trigger("simpayLoaded")},processForm:function(n){var s,i=n.data("simpay-form-id"),e=simplePayForms[i],a=this.spFormData[i];(a=t.extend({},e.form.integers,e.form.bools,e.form.strings)).formId=i,a.finalAmount=a.amount,a.quantity=1,a.stripeParams=t.extend({},e.stripe.strings,e.stripe.bools),a.oldPanelLabel=void 0!==a.stripeParams.panelLabel?a.stripeParams.panelLabel:"",r.trigger("simpayFormVarsInitialized",[n,a]),s=StripeCheckout.configure({key:a.stripeParams.key,token:function(i,s){n.find(".simpay-stripe-token").val(i.id),n.find(".simpay-stripe-email").val(i.email),simpayApp.handleStripeArgs(n,s),n.find(".simpay-payment-btn").prop("disabled",!0).find("span").text(a.loadingText),n.unbind("submit",[n,a]),n.submit()},opened:function(){},closed:function(){}}),n.find(".simpay-payment-btn").on("click.simpayPaymentBtn",function(i){i.preventDefault(),n.trigger("simpayBeforeStripePayment",[n,a]),simpayApp.submitPayment(n,a,s)}),this.spFormData[i]=a,r.trigger("simpayBindEventsAndTriggers",[n,a])},handleStripeArgs:function(i,s){s.shipping_name&&i.find(".simpay-shipping-name").val(s.shipping_name),s.shipping_address_country&&i.find(".simpay-shipping-country").val(s.shipping_address_country),s.shipping_address_zip&&i.find(".simpay-shipping-zip").val(s.shipping_address_zip),s.shipping_address_state&&i.find(".simpay-shipping-state").val(s.shipping_address_state),s.shipping_address_line1&&i.find(".simpay-shipping-address-line1").val(s.shipping_address_line1),s.shipping_address_city&&i.find(".simpay-shipping-city").val(s.shipping_address_city)},submitPayment:function(i,s,n){simpayApp.setFinalAmount(i,s),s.stripeParams.amount=parseInt(s.finalAmount),i.valid()&&(r.trigger("simpaySubmitPayment",[i,s]),spShared.debugLog("stripeParams",s.stripeParams),n.open(s.stripeParams))},setFinalAmount:function(i,s){var n=s.amount;s.finalAmount=n.toFixed(0),r.trigger("simpayFinalizeAmount",[i,s]),i.find(".simpay-amount").val(s.finalAmount)},formatMoney:function(i){var s,n="%s%v";return i=simpayApp.convertFromCents(i),"left_space"===spGeneral.strings.currencyPosition?n="%s %v":"right"===spGeneral.strings.currencyPosition?n="%v%s":"right_space"===spGeneral.strings.currencyPosition&&(n="%v %s"),s={symbol:spGeneral.strings.currencySymbol,decimal:spGeneral.strings.decimalSeparator,thousand:spGeneral.strings.thousandSeparator,precision:spGeneral.integers.decimalPlaces,format:n},accounting.formatMoney(i,s)},convertFromCents:function(i){return spGeneral.booleans.isZeroDecimal?i:(i/100).toFixed(2)},convertToCents:function(i){return spGeneral.booleans.isZeroDecimal?i:(100*i).toFixed(2)}},t(document).ready(function(i){simpayApp.init()})}(jQuery);
     6var simpayApp={};!function(t){"use strict";var e;simpayApp={spFormElList:{},spFormData:{},init:function(){e=t(document.body),simpayApp.spFormElList=e.find(".simpay-checkout-form"),simpayApp.spFormElList.each(function(){var i=t(this);simpayApp.setupCoreForm(i),e.trigger("simpaySetupCoreForm",[i])})},isStripeCheckoutForm:function(i){return void 0===i.formDisplayType||"stripe_checkout"===i.formDisplayType},setupCoreForm:function(i){var p=i.data("simpay-form-id"),s=simplePayForms[p],n=t.extend({},s.form.bools,s.form.integers,s.form.i18n,s.form.strings);n.formId=p,n.finalAmount=n.amount,n.quantity=1,n.stripeParams=t.extend({},s.stripe.strings,s.stripe.bools),n.oldPanelLabel=void 0!==n.stripeParams.panelLabel?n.stripeParams.panelLabel:"",n.submitBtnClass="simpay-payment-btn",e.trigger("simpayCoreFormVarsInitialized",[i,n]),simpayApp.isStripeCheckoutForm(n)&&simpayApp.setupStripeCheckout(i,n),simpayApp.spFormData[p]=n,e.trigger("simpayBindCoreFormEventsAndTriggers",[i,n])},setupStripeCheckout:function(n,e){var i=n.find("."+e.submitBtnClass),p=null;i.length&&(p=StripeCheckout.configure({key:e.stripeParams.key,token:function(i,p){!function(i,p){var s=n.find("."+e.submitBtnClass);t("<input>").attr({type:"hidden",name:"simpay_stripe_token",value:i.id}).appendTo(n),t("<input>").attr({type:"hidden",name:"simpay_stripe_email",value:i.email}).appendTo(n),p&&simpayApp.handleStripeShippingArgs(n,p);s.prop("disabled",!0).find("span").text(e.loadingText),n.off("submit"),n.submit()}(i,p)},opened:function(){},closed:function(){}})),n.on("submit",function(i){i.preventDefault(),e.isValid=!0,n.trigger("simpayBeforeStripePayment",[n,e]),e.isValid&&(simpayApp.setCoreFinalAmount(n,e),e.stripeParams.amount=spShared.convertToCents(e.finalAmount),n.find(".simpay-amount").val(e.stripeParams.amount),p.open(e.stripeParams))})},handleStripeShippingArgs:function(i,p){p.shipping_name&&i.find(".simpay-shipping-name").val(p.shipping_name),p.shipping_address_country&&i.find(".simpay-shipping-country").val(p.shipping_address_country),p.shipping_address_zip&&i.find(".simpay-shipping-zip").val(p.shipping_address_zip),p.shipping_address_state&&i.find(".simpay-shipping-state").val(p.shipping_address_state),p.shipping_address_line1&&i.find(".simpay-shipping-address-line1").val(p.shipping_address_line1),p.shipping_address_city&&i.find(".simpay-shipping-city").val(p.shipping_address_city)},setCoreFinalAmount:function(i,p){p.finalAmount=p.amount,e.trigger("simpayFinalizeCoreAmount",[i,p])}},t(document).ready(function(i){simpayApp.init()})}(jQuery);
  • stripe/trunk/assets/js/shared.js

    r1785812 r2051367  
    1 /* global spGeneral, jQuery  */
     1/* global spGeneral, jQuery */
    22
    33var spShared = {};
    44
    5 (function( $ ) {
     5( function( $ ) {
    66    'use strict';
    77
     
    1515            body = $( document.body );
    1616
    17             // Format currency inputs after they lose focus
    18             body.find( '.simpay-currency-format' ).on( 'blur.simpayCurrencyFormat', function( e ) {
    19                 spShared.formatCurrencyField( $( this ) );
     17            // Validate & update amount input fields on focus out (blur).
     18            body.find( '.simpay-amount-input' ).on( 'blur.validateAndUpdateAmount', function( e ) {
     19                spShared.validateAndUpdateAmountInput( $( this ) );
    2020            } );
    21 
    22             // Validate amount fields
    23             body.find( '.simpay-amount-input' ).on( 'blur.simpayValidateAmount', function( e ) {
    24                 spShared.validateAmount( $( this ) );
    25             } );
    26 
    27             // Triggers
    28             // Trigger the currency format for page load
    29             body.find( '.simpay-currency-format' ).trigger( 'blur.simpayCurrencyFormat' );
    30 
    31             // Trigger the amount inputs for page load
    32             body.find( '.simpay-amount-input' ).trigger( 'blur.simpayValidateAmount' );
    3321        },
    3422
    35         // Log to console if SCRIPT_DEBUG PHP constant set to true.
     23        /**
     24         * Return amount as number value.
     25         * Uses global decimal separator setting ("." or ",").
     26         * accounting.unformat removes formatting/cruft first.
     27         * Respects decimal separator, but ignores zero decimal currency setting.
     28         * Also prevent negative values.
     29         * @returns number
     30         */
     31        unformatCurrency: function( amount ) {
     32            return Math.abs( accounting.unformat( amount, spGeneral.strings.decimalSeparator ) );
     33        },
     34
     35        /**
     36         * Return amount as formatted string.
     37         * With or without currency symbol.
     38         * Used for labels & amount inputs in admin & front-end.
     39         * Uses global currency settings.
     40         * @returns string
     41         */
     42        formatCurrency: function( amount, includeSymbol ) {
     43
     44            // Default format is to the left with no space.
     45            var format = '%s%v',
     46                args;
     47
     48            // Include symbol param = false if omitted.
     49            includeSymbol = includeSymbol || false;
     50
     51            if ( includeSymbol ) {
     52
     53                // Account for other symbol placement formats (besides default left without space).
     54                switch ( spGeneral.strings.currencyPosition ) {
     55
     56                    case 'left_space':
     57                        format = '%s %v'; // Left side with space
     58                        break;
     59
     60                    case 'right':
     61                        format = '%v%s'; // Right side without space
     62                        break;
     63
     64                    case 'right_space':
     65                        format = '%v %s'; // Right side with space
     66                        break;
     67                }
     68            }
     69
     70            args = {
     71                symbol: includeSymbol ? spGeneral.strings.currencySymbol : '',
     72                decimal: spGeneral.strings.decimalSeparator,
     73                thousand: spGeneral.strings.thousandSeparator,
     74                precision: spGeneral.integers.decimalPlaces,
     75                format: format
     76            };
     77
     78            return accounting.formatMoney( amount, args );
     79        },
     80
     81        /**
     82         * Convert from cents to dollars (in USD).
     83         * Uses global zero decimal currency setting.
     84         * Leaves zero decimal currencies alone.
     85         * @returns number
     86         */
     87        convertToDollars: function( amount ) {
     88
     89            if ( !spGeneral.booleans.isZeroDecimal ) {
     90                amount = accounting.toFixed( amount / 100, 2 );
     91            }
     92
     93            return spShared.unformatCurrency( amount );
     94        },
     95
     96        /**
     97         * Convert from dollars to cents (in USD).
     98         * Uses global zero decimal currency setting.
     99         * Leaves zero decimal currencies alone.
     100         * @returns number
     101         */
     102        convertToCents: function( amount ) {
     103
     104            if ( !spGeneral.booleans.isZeroDecimal ) {
     105                amount = Number( accounting.toFixed( amount * 100, 0 ) );
     106            }
     107
     108            return amount;
     109        },
     110
     111        /**
     112         * Validate amount field client-side and update according to rules set by CSS classes.
     113         * Some fields display blank instead of "0.00" or "0".
     114         * Some fields require a minimum of "1.00" or "100" (100 currency units).
     115         * Invalid characters and the negative symbol will be removed.
     116         */
     117        validateAndUpdateAmountInput: function( el ) {
     118
     119            // Amount is intially a string.
     120            var amount = el.val();
     121
     122            var globalMinAmount = Math.abs( spGeneral.integers.minAmount );
     123
     124            // Convert amount to number value.
     125            amount = spShared.unformatCurrency( amount );
     126
     127            // Update amount field to blank if specific class is present.
     128            // If zero, convert to blank and exit function.
     129            // Ex: Default Custom Amount, Setup Fee
     130            if ( el.hasClass( 'simpay-allow-blank-amount' ) ) {
     131                if ( 0 === amount ) {
     132                    el.val( '' );
     133                    return;
     134                }
     135            }
     136
     137            // Validate & update fields to the global minimum amount (usually $1.00) if specific class is present.
     138            // Namely this is just on admin pages, separate from the custom amount minimum amount set per form.
     139            // Ex: One-Time Amount, Minimum Custom Amount
     140            if ( el.hasClass( 'simpay-minimum-amount-required' ) ) {
     141                if ( amount < globalMinAmount ) {
     142                    amount = globalMinAmount;
     143                }
     144            }
     145
     146            // Convert amount back to string with proper thousands & decimal separators, but without symbol.
     147            amount = spShared.formatCurrency( amount, false );
     148
     149            // Update format price string in input field.
     150            // Exception: If they changed to 'number' type via filters don't reformat (default type is 'tel').
     151            if ( 'number' !== el[0].type ) {
     152                el.val( amount );
     153            }
     154        },
     155
     156        /**
     157         * Log debug messages to console.
     158         * Alternative to console.log so doesn't show up in production environments.
     159         * Instead, only if SCRIPT_DEBUG PHP constant set to true.
     160         */
    36161        debugLog: function( key, value ) {
    37162
     
    39164                console.log( key, value );
    40165            }
    41         },
    42 
    43         formatCurrencyField: function( elem ) {
    44 
    45             elem.val( function( index, value ) {
    46 
    47                 // Some fields we want to allow nothing to be entered but still be formatted as an amount field
    48                 if ( elem.hasClass( 'simpay-allow-empty' ) && !elem.val() ) {
    49                     return '';
    50                 }
    51 
    52                 return accounting.formatMoney( accounting.unformat( value, spGeneral.strings.decimalSeparator ), '', 2, spGeneral.strings.thousandSeparator, spGeneral.strings.decimalSeparator );
    53             } );
    54         },
    55 
    56         validateAmount: function( elem ) {
    57 
    58             var amount = spShared.unformatCurrency( elem.val() );
    59 
    60             // If the amount doesn't exist or is  less than 1
    61             if ( !amount || spGeneral.integers.minAmount > parseFloat( amount ) ) {
    62                 elem.val( '' );
    63 
    64                 return false;
    65             }
    66 
    67             // Set the correct decimal separator according to settings
    68             amount = amount.replace( '.', spGeneral.strings.decimalSeparator );
    69 
    70             // Check if current number is negative or not.
    71             if ( -1 !== amount.indexOf( '-' ) ) {
    72                 amount = amount.replace( '-', '' );
    73             }
    74 
    75             // Update format price string in input field.
    76             elem.val( amount );
    77         },
    78 
    79         unformatCurrency: function( amount ) {
    80 
    81             amount = accounting.unformat( amount, spGeneral.strings.decimalSeparator ).toString();
    82 
    83             if ( !spGeneral.booleans.isZeroDecimal ) {
    84 
    85                 // Set default value for number of decimals.
    86                 amount = parseFloat( amount ).toFixed( 2 );
    87             }
    88 
    89             return amount;
    90 
    91166        }
    92167    };
    93168
    94169    $( document ).ready( function( $ ) {
    95 
    96170        spShared.init();
    97171    } );
  • stripe/trunk/assets/js/shared.min.js

    r1967366 r2051367  
    1 /*! WP Simple Pay Lite for Stripe - 2.0.12
     1/*! WP Simple Pay Lite for Stripe - 2.1.0
    22 * https://wpsimplepay.com/
    3  * Copyright (c) Moonstone Media Group 2018
     3 * Copyright (c) Moonstone Media Group 2019
    44 * Licensed GPLv2+ */
    55
    6 var spShared={};!function(r){"use strict";var n;spShared={init:function(){(n=r(document.body)).find(".simpay-currency-format").on("blur.simpayCurrencyFormat",function(n){spShared.formatCurrencyField(r(this))}),n.find(".simpay-amount-input").on("blur.simpayValidateAmount",function(n){spShared.validateAmount(r(this))}),n.find(".simpay-currency-format").trigger("blur.simpayCurrencyFormat"),n.find(".simpay-amount-input").trigger("blur.simpayValidateAmount")},debugLog:function(n,r){"undefined"!=typeof spGeneral&&!0===spGeneral.booleans.scriptDebug&&console.log(n,r)},formatCurrencyField:function(a){a.val(function(n,r){return a.hasClass("simpay-allow-empty")&&!a.val()?"":accounting.formatMoney(accounting.unformat(r,spGeneral.strings.decimalSeparator),"",2,spGeneral.strings.thousandSeparator,spGeneral.strings.decimalSeparator)})},validateAmount:function(n){var r=spShared.unformatCurrency(n.val());if(!r||spGeneral.integers.minAmount>parseFloat(r))return n.val(""),!1;-1!==(r=r.replace(".",spGeneral.strings.decimalSeparator)).indexOf("-")&&(r=r.replace("-","")),n.val(r)},unformatCurrency:function(n){return n=accounting.unformat(n,spGeneral.strings.decimalSeparator).toString(),spGeneral.booleans.isZeroDecimal||(n=parseFloat(n).toFixed(2)),n}},r(document).ready(function(n){spShared.init()})}(jQuery);
     6var spShared={};!function(e){"use strict";spShared={init:function(){e(document.body).find(".simpay-amount-input").on("blur.validateAndUpdateAmount",function(n){spShared.validateAndUpdateAmountInput(e(this))})},unformatCurrency:function(n){return Math.abs(accounting.unformat(n,spGeneral.strings.decimalSeparator))},formatCurrency:function(n,e){var a,r="%s%v";if(e=e||!1)switch(spGeneral.strings.currencyPosition){case"left_space":r="%s %v";break;case"right":r="%v%s";break;case"right_space":r="%v %s"}return a={symbol:e?spGeneral.strings.currencySymbol:"",decimal:spGeneral.strings.decimalSeparator,thousand:spGeneral.strings.thousandSeparator,precision:spGeneral.integers.decimalPlaces,format:r},accounting.formatMoney(n,a)},convertToDollars:function(n){return spGeneral.booleans.isZeroDecimal||(n=accounting.toFixed(n/100,2)),spShared.unformatCurrency(n)},convertToCents:function(n){return spGeneral.booleans.isZeroDecimal||(n=Number(accounting.toFixed(100*n,0))),n},validateAndUpdateAmountInput:function(n){var e=n.val(),a=Math.abs(spGeneral.integers.minAmount);e=spShared.unformatCurrency(e),n.hasClass("simpay-allow-blank-amount")&&0===e?n.val(""):(n.hasClass("simpay-minimum-amount-required")&&e<a&&(e=a),e=spShared.formatCurrency(e,!1),"number"!==n[0].type&&n.val(e))},debugLog:function(n,e){"undefined"!=typeof spGeneral&&!0===spGeneral.booleans.scriptDebug&&console.log(n,e)}},e(document).ready(function(n){spShared.init()})}(jQuery);
  • stripe/trunk/assets/js/upgrade-link.min.js

    r1967366 r2051367  
    1 /*! WP Simple Pay Lite for Stripe - 2.0.12
     1/*! WP Simple Pay Lite for Stripe - 2.1.0
    22 * https://wpsimplepay.com/
    3  * Copyright (c) Moonstone Media Group 2018
     3 * Copyright (c) Moonstone Media Group 2019
    44 * Licensed GPLv2+ */
    55
  • stripe/trunk/includes/core/abstracts/field.php

    r1785812 r2051367  
    280280        $classes    = '';
    281281        $type_class = '';
    282         $error      = '';
    283282
    284283        if ( ! empty( $class ) && is_array( $class ) ) {
     
    288287            $type_class = esc_attr( $this->type_class );
    289288        }
    290         if ( true !== $this->validation && ! empty( $this->validation ) ) {
    291             $error = 'simpay-field-error ';
    292         }
    293 
    294         $this->class = trim( $error . 'simpay-field ' . $type_class . ' ' . $classes );
     289
     290        $this->class = trim( 'simpay-field ' . $type_class . ' ' . $classes );
    295291    }
    296292
  • stripe/trunk/includes/core/abstracts/form.php

    r1851310 r2051367  
    3131
    3232    /* Ambiguous Keys */
     33    public $account_id = '';
    3334    public $secret_key = '';
    3435    public $publishable_key = '';
     
    4041    public $payment_failure_page = '';
    4142    public $locale = '';
     43    public $country = '';
    4244
    4345    /* Currency Options */
     
    6870    public $statement_descriptor = '';
    6971
    70     /** CHECKOUT OVERLAY DISPLAY **/
     72    /** STRIPE CHECKOUT DISPLAY **/
    7173
    7274    public $company_name = '';
     
    118120        $simpay_form = $this;
    119121
     122        $this->maybe_register_hooks();
     123
    120124        do_action( 'simpay_form_loaded' );
    121125    }
     126
     127    /**
     128     * Determine if hooks should be registered.
     129     *
     130     * Hooks get run once per form instance. See https://github.com/wpsimplepay/WP-Simple-Pay-Pro-3/issues/617
     131     *
     132     */
     133    public function maybe_register_hooks() {
     134
     135        global $simpay_displayed_form_ids;
     136
     137        if( ! is_array( $simpay_displayed_form_ids ) ) {
     138            $simpay_displayed_form_ids = array();
     139        }
     140
     141        // Collect any form IDs we've displayed already so we can avoid duplicate IDs
     142        if ( ! isset( $simpay_displayed_form_ids[ $this->id ] ) ) {
     143            $this->register_hooks();
     144
     145            $simpay_displayed_form_ids[ $this->id ] = true;
     146        }
     147
     148    }
     149
     150    /**
     151     * Add hooks and filters for this form instance.
     152     *
     153     * Hooks get run once per form instance. See https://github.com/wpsimplepay/WP-Simple-Pay-Pro-3/issues/617
     154     *
     155     */
     156    public function register_hooks() {}
    122157
    123158    /**
     
    171206        $this->secret_key      = simpay_get_filtered( 'secret_key', simpay_is_test_mode() ? $this->test_secret_key : $this->live_secret_key, $this->id );
    172207        $this->publishable_key = simpay_get_filtered( 'publishable_key', simpay_is_test_mode() ? $this->test_publishable_key : $this->live_publishable_key, $this->id );
     208        $this->account_id      = simpay_get_filtered( 'account_id', $this->account_id, $this->id );
    173209
    174210        /** GENERAL **/
     
    185221
    186222        $this->locale      = simpay_get_filtered( 'locale', simpay_get_global_setting( 'locale' ), $this->id );
     223        $this->country     = simpay_get_filtered( 'country', simpay_get_global_setting( 'country' ), $this->id );
    187224
    188225        /* Currency Options */
     
    222259        /* one-time payment options */
    223260
    224         $this->amount = simpay_convert_amount_to_cents( simpay_get_filtered( 'amount', simpay_get_saved_meta( $this->id, '_amount', '100' ), $this->id ) );
     261        $this->amount = simpay_get_filtered( 'amount', simpay_get_saved_meta( $this->id, '_amount', simpay_global_minimum_amount() ), $this->id );
    225262
    226263        // Statement descriptor
    227         $this->statement_descriptor = simpay_get_filtered( 'statement_descriptor', simpay_get_saved_meta( $this->id, '_statement_descriptor', '' ), $this->id );
    228 
    229         /** CHECKOUT OVERLAY DISPLAY **/
     264        $this->statement_descriptor = simpay_get_filtered( 'statement_descriptor', null, $this->id );
     265
     266        /** STRIPE CHECKOUT DISPLAY **/
    230267
    231268        $this->company_name = simpay_get_filtered( 'company_name', simpay_get_saved_meta( $this->id, '_company_name' ), $this->id );
     
    370407        }
    371408
     409        // Country
     410        if ( ! empty( $this->country ) ) {
     411            $strings['strings']['country'] = $this->country;
     412        }
     413
    372414        // Currency
    373415        if ( ! empty( $this->currency ) ) {
  • stripe/trunk/includes/core/admin/assets.php

    r1851310 r2051367  
    7373                'footer' => false,
    7474            ),
    75             'simpay-jquery-validate' => array(
    76                 'src'    => $js_path . 'vendor/jquery.validate' . $this->min . '.js',
    77                 'deps'   => array( 'jquery' ),
    78                 'ver'    => SIMPLE_PAY_VERSION,
    79                 'footer' => false,
    80             ),
    8175            'simpay-accounting'      => array(
    8276                'src'    => $js_path . 'vendor/accounting' . $this->min . '.js',
     
    9690                    'jquery',
    9791                    'simpay-chosen',
    98                     'simpay-jquery-validate',
    9992                    'simpay-accounting',
    10093                    'simpay-shared',
  • stripe/trunk/includes/core/admin/metaboxes/settings.php

    r1851310 r2051367  
    2020    public static function html( $post ) {
    2121
     22        // @todo Don't use a static method and allow this class to properly register hooks.
     23        add_action( 'simpay_admin_before_stripe_checkout_rows', array( __CLASS__, 'add_company_info_settings' ) );
     24
    2225        // @see Meta_Boxes::save_meta_boxes()
    2326        wp_nonce_field( 'simpay_save_data', 'simpay_meta_nonce' );
     
    3942                    <?php
    4043
    41                     $payment_options_template = apply_filters( 'simpay_payment_options_template', 'views/tabs/tab-payment-options.php' );
    42 
    43                     include_once( $payment_options_template );
     44                    $payment_options_template = apply_filters( 'simpay_payment_options_template', SIMPLE_PAY_INC . 'core/admin/metaboxes/views/tabs/tab-payment-options.php' );
     45
     46                    if ( file_exists( $payment_options_template ) ) {
     47                        include_once( $payment_options_template );
     48                    }
    4449
    4550                    do_action( 'simpay_form_settings_meta_payment_options_panel', $post->ID );
    46                     ?>
    47                 </div>
    48 
    49                 <!-- On-Page Form Display Options Tab -->
    50                 <div id="form-display-settings-panel" class="simpay-panel simpay-panel-hidden">
    51                     <?php
    52 
    53                     $form_display_template = apply_filters( 'simpay_form_display_template', 'views/tabs/tab-form-display.php' );
    54 
    55                     include_once( $form_display_template );
     51
     52                    ?>
     53                </div>
     54
     55                <!-- Form Display Options Tab -->
     56                <div id="form-display-options-settings-panel" class="simpay-panel simpay-panel-hidden">
     57                    <?php
     58
     59                    $form_display_options_template = apply_filters( 'simpay_form_options_template', '' );
     60
     61                    if ( file_exists( $form_display_options_template ) ) {
     62                        include( $form_display_options_template );
     63                    }
     64
     65                    ?>
     66                </div>
     67
     68                <!-- Custom Form Fields Options Tab -->
     69                <div id="custom-form-fields-settings-panel" class="simpay-panel simpay-panel-hidden">
     70                    <?php
     71
     72                    $form_display_template = apply_filters( 'simpay_form_display_template', SIMPLE_PAY_INC . 'core/admin/metaboxes/views/tabs/tab-custom-form-fields.php' );
     73
     74                    if ( file_exists( $form_display_template ) ) {
     75                        include_once( $form_display_template );
     76                    }
    5677
    5778                    do_action( 'simpay_form_settings_meta_form_display_panel', $post->ID );
    58                     ?>
    59                 </div>
    60 
    61                 <!-- Checkout Overlay Display Options Tab -->
    62                 <div id="overlay-display-settings-panel" class="simpay-panel simpay-panel-hidden">
    63                     <?php
    64 
    65                     $overlay_display_template = apply_filters( 'simpay_overlay_display_template', 'views/tabs/tab-overlay-display.php' );
    66 
    67                     include_once( $overlay_display_template );
    68 
    69                     do_action( 'simpay_form_settings_meta_overlay_display_panel', $post->ID );
     79
     80                    ?>
     81                </div>
     82
     83                <!-- Stripe Checkout Display Options Tab -->
     84                <div id="stripe-checkout-settings-panel" class="simpay-panel simpay-panel-hidden">
     85                    <?php
     86
     87                    $stripe_checkout_template = apply_filters( 'simpay_stripe_checkout_template', SIMPLE_PAY_INC . 'core/admin/metaboxes/views/tabs/tab-stripe-checkout.php' );
     88
     89                    if ( file_exists( $stripe_checkout_template ) ) {
     90                        include_once( $stripe_checkout_template );
     91                    }
     92
     93                    do_action( 'simpay_form_settings_meta_stripe_checkout_panel', $post->ID );
     94
    7095                    ?>
    7196                </div>
     
    77102                    $subscription_options_template = apply_filters( 'simpay_subscription_options_template', SIMPLE_PAY_INC . 'core/admin/metaboxes/views/tabs/tab-subscription-options.php' );
    78103
    79                     include_once( $subscription_options_template );
     104                    if ( file_exists( $subscription_options_template ) ) {
     105                        include_once( $subscription_options_template );
     106                    }
    80107
    81108                    do_action( 'simpay_form_settings_meta_subscription_display_panel', $post->ID );
     
    109136            ),
    110137            'form_display'         => array(
    111                 'label'  => esc_html__( 'On-Page Form Display', 'stripe' ),
    112                 'target' => 'form-display-settings-panel',
     138                'label'  => esc_html__( 'Custom Form Fields', 'stripe' ),
     139                'target' => 'custom-form-fields-settings-panel',
    113140                'class'  => array(),
    114141                'icon'   => '',
    115142            ),
    116             'overlay_display'      => array(
    117                 'label'  => esc_html__( 'Checkout Overlay Display', 'stripe' ),
    118                 'target' => 'overlay-display-settings-panel',
    119                 'class'  => array(),
     143            'stripe_checkout'      => array(
     144                'label'  => esc_html__( 'Stripe Checkout Display', 'stripe' ),
     145                'target' => 'stripe-checkout-settings-panel',
     146                'class'  => array( 'toggle-_form_display_type-stripe_checkout' ),
    120147                'icon'   => '',
    121148            ),
     
    179206        }
    180207
    181         // See what type of currency we are dealing with so we know how to save the values
    182         $is_zero_decimal = simpay_is_zero_decimal();
    183 
    184 
    185208        /** Payment Options */
    186209
     
    189212        update_post_meta( $post_id, '_amount_type', $amount_type );
    190213
     214        // TODO Rewrite. Hard to read.
     215
    191216        // Amount
    192         if ( $is_zero_decimal ) {
    193             $amount = isset( $_POST['_amount'] ) ? sanitize_text_field( $_POST['_amount'] ) : ( false !== get_post_meta( $post_id, '_amount', true ) ? get_post_meta( $post_id, '_amount', true ) : '100' );
    194         } else {
    195             $amount = isset( $_POST['_amount'] ) ? sanitize_text_field( $_POST['_amount'] ) : ( false !== get_post_meta( $post_id, '_amount', true ) ? get_post_meta( $post_id, '_amount', true ) : '1' );
    196         }
     217        $amount = isset( $_POST['_amount'] ) ? sanitize_text_field( $_POST['_amount'] ) : ( false !== get_post_meta( $post_id, '_amount', true ) ? get_post_meta( $post_id, '_amount', true ) : simpay_global_minimum_amount() );
     218
    197219        update_post_meta( $post_id, '_amount', $amount );
    198220
     
    211233        update_post_meta( $post_id, '_success_redirect_url', $success_redirect_url );
    212234
     235        /** Form Display Options **/
     236
     237
     238        // Form Display Type
     239        $form_display_type = isset( $_POST['_form_display_type'] ) ? sanitize_text_field( $_POST['_form_display_type'] ) : '';
     240        update_post_meta( $post_id, '_form_display_type', $form_display_type );
     241
     242        /** Stripe Checkout Display */
     243
     244        // Company name
     245        $company_name = isset( $_POST['_company_name'] ) ? sanitize_text_field( $_POST['_company_name'] ) : '';
     246        update_post_meta( $post_id, '_company_name', $company_name );
     247
     248        // Item Description
     249        $item_description = isset( $_POST['_item_description'] ) ? sanitize_text_field( $_POST['_item_description'] ) : '';
     250        update_post_meta( $post_id, '_item_description', $item_description );
     251
     252        // Image URL
     253        $image_url = isset( $_POST['_image_url'] ) ? sanitize_text_field( $_POST['_image_url'] ) : '';
     254        update_post_meta( $post_id, '_image_url', $image_url );
     255
     256        // Enable Remember Me
     257        $enable_remember_me = isset( $_POST['_enable_remember_me'] ) ? 'yes' : 'no';
     258        update_post_meta( $post_id, '_enable_remember_me', $enable_remember_me );
     259
     260        // Checkout Button Text
     261        $checkout_button_text = isset( $_POST['_checkout_button_text'] ) ? sanitize_text_field( $_POST['_checkout_button_text'] ) : '';
     262        update_post_meta( $post_id, '_checkout_button_text', $checkout_button_text );
     263
    213264        // Verify Zip/Postal Code
    214265        $verify_zip = isset( $_POST['_verify_zip'] ) ? 'yes' : 'no';
    215266        update_post_meta( $post_id, '_verify_zip', $verify_zip );
    216267
    217         /** Checkout Overlay Display */
    218 
    219         // Company name
    220         $company_name = isset( $_POST['_company_name'] ) ? sanitize_text_field( $_POST['_company_name'] ) : '';
    221         update_post_meta( $post_id, '_company_name', $company_name );
    222 
    223         // Image URL
    224         $image_url = isset( $_POST['_image_url'] ) ? sanitize_text_field( $_POST['_image_url'] ) : '';
    225         update_post_meta( $post_id, '_image_url', $image_url );
    226 
    227         // Item Description
    228         $item_description = isset( $_POST['_item_description'] ) ? sanitize_text_field( $_POST['_item_description'] ) : '';
    229         update_post_meta( $post_id, '_item_description', $item_description );
    230 
    231         // Enable Remember Me
    232         $enable_remember_me = isset( $_POST['_enable_remember_me'] ) ? 'yes' : 'no';
    233         update_post_meta( $post_id, '_enable_remember_me', $enable_remember_me );
    234 
    235268        // Enable Billing Address
    236269        $enable_billing_address = isset( $_POST['_enable_billing_address'] ) ? 'yes' : 'no';
     
    240273        $enable_shipping_address = isset( $_POST['_enable_shipping_address'] ) ? 'yes' : 'no';
    241274        update_post_meta( $post_id, '_enable_shipping_address', $enable_shipping_address );
    242 
    243         // Checkout Button Text
    244         $checkout_button_text = isset( $_POST['_checkout_button_text'] ) ? sanitize_text_field( $_POST['_checkout_button_text'] ) : '';
    245         update_post_meta( $post_id, '_checkout_button_text', $checkout_button_text );
    246275
    247276        // Save custom fields
     
    295324        return $arr;
    296325    }
     326
     327    /**
     328     * Output Company Info settings in the Stripe Checkout tab.
     329     *
     330     * @since 3.4.0
     331     */
     332    public static function add_company_info_settings() {
     333        include_once SIMPLE_PAY_INC . 'core/admin/metaboxes/views/partials/company-info-settings.php';
     334    }
    297335}
  • stripe/trunk/includes/core/admin/metaboxes/views/tabs/tab-payment-options.php

    r1915991 r2051367  
    3333                    'simpay-field-tiny',
    3434                    'simpay-amount-input',
     35                    'simpay-minimum-amount-required',
    3536                );
    3637
    37                 // Attributes
    38                 $attr = array(
    39                     'min' => simpay_get_stripe_minimum_amount(),
    40                 );
    41 
    42                 // Check saved currency and set default to 100 or 1 accordingly and set steps and class
    43                 if ( simpay_is_zero_decimal() ) {
    44                     $amount = simpay_get_saved_meta( $post->ID, '_amount', '100' );
    45                 } else {
    46                     $amount = simpay_get_saved_meta( $post->ID, '_amount', '1' );
    47                 }
     38                // Check saved currency and set default to 100 or 1 accordingly and set steps and class.
     39                $amount = simpay_get_saved_meta( $post->ID, '_amount', simpay_global_minimum_amount() );
    4840
    4941                simpay_print_field( array(
     
    5345                    'id'          => '_amount',
    5446                    'value'       => $amount,
    55                     'attributes'  => $attr,
    5647                    'class'       => $classes,
    57                     'placeholder' => simpay_formatted_amount( '100', '', false ),
     48                    'placeholder' => simpay_format_currency( simpay_global_minimum_amount(), simpay_get_setting( 'currency' ), false ),
    5849                ) );
     50
    5951                ?>
    6052
  • stripe/trunk/includes/core/admin/notices.php

    r1878801 r2051367  
    1515     */
    1616    public function __construct() {
    17        
     17
    1818        add_action( 'admin_notices', array( $this, 'show_notices' ) );
     19        add_action( 'admin_notices', array( $this, 'show_upgrade_php_version_notice' ) );
    1920
    2021        add_action( 'in_plugin_update_message-' . plugin_basename( SIMPLE_PAY_MAIN_FILE ), array(
     
    3940            }
    4041
    41             $this->api_keys_error();
     42            $this->stripe_connect_notice();
    4243            $this->ssl_error();
    43 
    44             // TODO Maybe reuse this for upcoming PHP 5.6 requirement.
    45             /*
    46             // Show non-dismissable notice for dropping PHP 5.3 next update.
    47             if ( version_compare( PHP_VERSION, '5.4', '<' ) ) {
    48 
    49                 $notice_message = __( 'WP Simple Pay and Stripe are ending compatibility with PHP 5.3 in the next update. Please update PHP before updating WP Simple Pay.', 'simple-pay' ) . '<br/>' .
    50                                   __( 'We strongly recommend PHP 7.0 or higher.', 'simple-pay' ) .
    51                                   ' <a href="https://wordpress.org/about/requirements/" target="_blank">' . __( 'Click here for more details and a letter you can send to your host.', 'simple-pay' ) . '</a> ';
    52 
    53                 self::print_notice( $notice_message );
    54             }
    55             */
    5644
    5745            do_action( 'simpay_admin_notices', $this->is_admin_screen );
     
    7462
    7563    /**
    76      * Function to display error messages for missing API Keys.
    77      */
    78     public function api_keys_error() {
    79 
    80         if ( ! simpay_check_keys_exist() && ( ( false !== $this->is_admin_screen && ( 'simpay_settings' === $this->is_admin_screen && isset( $_GET['tab'] ) && 'keys' !== $_GET['tab'] && 'license' !== $_GET['tab'] ) || 'simpay' === $this->is_admin_screen ) ) ) {
    81 
    82             /* Translators: 1. "test Stripe API keys" OR "live Stripe API keys" 2. Plugin name */
    83             $notice_message = sprintf( __( 'Your %1$s Stripe API Keys for %2$s have not been entered.', 'stripe' ), ( simpay_is_test_mode() ? _x( 'test', 'Your test Stripe API keys...', 'stripe' ) : _x( 'live', 'Your live Stripe API keys...', 'stripe' ) ), SIMPLE_PAY_PLUGIN_NAME );
    84             $notice_message .= ' <a href="' . admin_url( 'admin.php?page=simpay_settings&tab=keys' ) . '">' . esc_html__( 'Enter them here.', 'stripe' ) . '</a>';
    85 
    86             self::print_notice( $notice_message, 'error' );
    87         }
     64     * Function to display an alert to installs that have not authorized through Stripe Connect
     65     */
     66    public function stripe_connect_notice() {
     67        // If they are forced to use Stripe Connect they do not need to be notified about the functionality.
     68        if ( ! simpay_can_site_manage_stripe_keys() ) {
     69            return;
     70        }
     71
     72        if ( 'simpay_settings' === $this->is_admin_screen && isset( $_GET['tab'] ) && 'keys' === $_GET['tab'] ) {
     73            return;
     74        }
     75
     76        if ( $this->check_if_dismissed( 'stripe-connect' ) ) {
     77            return;
     78        }
     79
     80        if ( ! simpay_get_account_id() ) {
     81            $notice_message = sprintf(
     82                __( 'WP Simple Pay now supports Stripe Connect for easier setup and improved security. <a href="%s">Click here</a> to connect your Stripe account.', 'stripe' ),
     83                admin_url( 'admin.php?page=simpay_settings&tab=keys' )
     84            );
     85
     86            self::print_notice( $notice_message, 'info', 'stripe-connect' );
     87        }
     88    }
     89
     90    /**
     91     * Output the PHP requirement notice.
     92     *
     93     * This warns users that the plugin will not be able to function in their
     94     * environment after a future update.
     95     *
     96     * @since 3.4.0
     97     */
     98    public function show_upgrade_php_version_notice() {
     99        $future_required_version = 5.6;
     100
     101        if ( ! version_compare( PHP_VERSION, $future_required_version, '<' ) ) {
     102            return;
     103        }
     104
     105        $notice_message = '<p><strong>' . __( 'WP Simple Pay is increasing its PHP version requirement.', 'stripe' ) . '</strong></p>';
     106        $notice_message .= '<p>' . sprintf( __( 'WP Simple Pay will be increasing its PHP requirement to version <code>%1$s</code> or higher in an upcoming release. It looks like you\'re using version <code>%2$s</code>, which means you will need to upgrade your version of PHP to allow the plugin to continue to function. Newer versions of PHP are both faster and more secure. The version you\'re using <a href="%3$s" target="_blank">no longer receives security updates</a>, which is another great reason to update.', 'stripe' ), $future_required_version, PHP_VERSION, 'http://php.net/eol.php' ) . '</p>';
     107
     108        $notice_message .= '<p><strong>' . __( 'Which version should I upgrade to?', 'stripe' ) . '</strong></p>';
     109        $notice_message .= '<p>' . sprintf( __( 'In order to be compatible with future versions of WP Simple Pay, you should update your PHP version to <code>%1$s</code>, <code>7.0</code>, <code>7.1</code>, or <code>7.2</code>. On a normal WordPress site, switching to PHP <code>%1$s</code> should never cause issues. We would however actually recommend you switch to PHP <code>7.1</code> or higher to receive the full speed and security benefits provided to more modern and fully supported versions of PHP. However, some plugins may not be fully compatible with PHP <code>7.x</code>, so more testing may be required.', 'stripe' ), $future_required_version ) . '</p>';
     110
     111        $notice_message .= '<p><strong>' . __( 'Need help upgrading? Ask your web host!', 'stripe' ) . '</strong></p>';
     112        $notice_message .= '<p>' . sprintf( __( 'Many web hosts can give you instructions on how/where to upgrade your version of PHP through their control panel, or may even be able to do it for you. If you need to change hosts, please see <a href="%s" target="_blank">our hosting recommendations</a>.', 'stripe' ), 'https://wpsimplepay.com/recommended-wordpress-hosting/' ) . '</p>';
     113
     114        self::print_notice( $notice_message );
    88115    }
    89116
  • stripe/trunk/includes/core/admin/pages.php

    r1785812 r2051367  
    7474        $this->tab = isset( $tabs[0] ) ? $tabs[0] : '';
    7575
    76         // Remove the Save Changes button from the license page
    77         add_filter( 'simpay_admin_page_settings_license_submit', function () {
    78             return false;
    79         } );
    80 
    8176        add_filter( 'admin_footer_text', array( $this, 'add_footer_text' ) );
    8277
  • stripe/trunk/includes/core/admin/pages/general.php

    r1785812 r2051367  
    132132                    $saved_currency_symbol = simpay_get_currency_symbol( $this->get_option_value( $section, 'currency' ) );
    133133
    134                     $formatted_amount = simpay_formatted_amount( 499, '', false );
     134                    $formatted_amount = simpay_format_currency( ( simpay_is_zero_decimal() ? 499 : 4.99 ), '', false );
    135135
    136136                    $fields[ $section ] = array(
  • stripe/trunk/includes/core/admin/pages/keys.php

    r1785812 r2051367  
    2727        $this->id           = 'keys';
    2828        $this->option_group = 'settings';
    29         $this->label        = esc_html__( 'Stripe Keys', 'stripe' );
     29        $this->label        = esc_html__( 'Stripe Setup', 'stripe' );
    3030        $this->link_text    = esc_html__( 'Help docs for Stripe Keys Settings', 'stripe' );
    3131        $this->link_slug    = ''; // TODO: Fill in slug, not in use currently (issue #301)
     
    4646
    4747        return apply_filters( 'simpay_add_' . $this->option_group . '_' . $this->id . '_sections', array(
     48            'connect'      => array(
     49                'title' => '',
     50            ),
    4851            'mode'      => array(
    4952                'title' => '',
     
    5356            ),
    5457            'live_keys' => array(
     58                'title' => '',
     59            ),
     60            'country' => array(
    5561                'title' => '',
    5662            ),
     
    7581                $section = sanitize_key( $section );
    7682
    77                 if ( 'mode' == $section ) {
     83                if ( 'connect' == $section ) {
     84
     85                    $stripe_connect_url = add_query_arg( array(
     86                        'live_mode' => (int) ! simpay_is_test_mode(),
     87                        'state' => str_pad( wp_rand( wp_rand(), PHP_INT_MAX ), 100, wp_rand(), STR_PAD_BOTH ),
     88                        'customer_site_url' => admin_url( 'admin.php?page=simpay_settings&tab=keys' ),
     89                    ), 'https://wpsimplepay.com/?wpsp_gateway_connect_init=stripe_connect' );
     90
     91                    $show_connect_button = false;
     92
     93                    $mode = simpay_is_test_mode() ? __( 'test', 'stripe' ) : __( 'live', 'stripe' );
     94
     95                    if( simpay_is_test_mode() && ! simpay_check_keys_exist() ) {
     96
     97                        $show_connect_button = true;
     98
     99                    } elseif( ! simpay_check_keys_exist() ) {
     100
     101                        $show_connect_button = true;
     102
     103                    }
     104
     105                    if( $show_connect_button ) {
     106
     107                        $html = '<a href="'. esc_url( $stripe_connect_url ) .'" class="wpsp-stripe-connect"><span>' . __( 'Connect with Stripe', 'stripe' ) . '</span></a>';
     108                        $html .= '<p>' . sprintf( __( 'Have questions about connecting with Stripe? See the <a href="%s" target="_blank" rel="noopener noreferrer">documentation</a>.', 'stripe' ), simpay_get_url( 'docs' ) . 'articles/stripe-setup/' ) . '</p>';
     109                       
     110                    } else {
     111
     112                        $html = sprintf( __( 'Your Stripe account is connected in %s mode. If you need to reconnect in %s mode, <a href="%s">click here</a>.', 'stripe' ), '<strong>' . $mode . '</strong>', $mode, esc_url( $stripe_connect_url ) );
     113                   
     114                    }
     115
     116                    if ( simpay_can_site_manage_stripe_keys() ) {
     117                        $html .= '<p id="wpsp-api-keys-row-reveal">' . __( '<a href="#">Click here</a> to manage your API keys manually.', 'stripe' ) . '</p>';
     118                        $html .= '<p id="wpsp-api-keys-row-hide">' . __( '<a href="#">Click here</a> to hide your API keys.', 'stripe' ) . '</p>';
     119                    }
     120
     121                    $fields[ $section ] = array(
     122                        'test_mode' => array(
     123                            'title'       => esc_html__( 'Connection Status', 'stripe' ),
     124                            'type'        => 'custom-html',
     125                            'html'        => $html,
     126                            'name'        => 'simpay_' . $this->option_group . '_' . $this->id . '[' . $section . '][test_mode]',
     127                            'id'          => 'simpay-' . $this->option_group . '-' . $this->id . '-' . $section . '-test-mode',
     128                        ),
     129                    );
     130                } elseif  ( 'mode' == $section ) {
    78131                    $fields[ $section ] = array(
    79132                        'test_mode' => array(
     
    85138                                'disabled' => esc_html__( 'Disabled', 'stripe' ),
    86139                            ),
     140                            'value'       => $this->get_option_value( $section, 'test_mode' ),                     
    87141                            'name'        => 'simpay_' . $this->option_group . '_' . $this->id . '[' . $section . '][test_mode]',
    88142                            'id'          => 'simpay-' . $this->option_group . '-' . $this->id . '-' . $section . '-test-mode',
    89                             'value'       => $this->get_option_value( $section, 'test_mode' ),
    90143                            'inline'      => 'inline',
    91144                            'description' => sprintf( wp_kses( __( 'While in test mode no live payments are processed. Make sure Test mode is enabled in your <a href="%1$s" target="_blank">Stripe dashboard</a> to view your test transactions.', 'stripe' ), array(
    92145                                    'a' => array( 'href' => array(), 'target' => array() ),
    93                                 ) ), esc_url( 'https://dashboard.stripe.com/' ) ) . '<br/><br/>' . sprintf( wp_kses( __( '<a href="%1$s" target="_blank">Retrieve your Stripe API test and live keys.</a>', 'stripe' ), array(
    94                                     'a' => array( 'href' => array(), 'target' => array() ),
    95                                 ) ), esc_url( 'https://dashboard.stripe.com/account/apikeys' ) ),
     146                                ) ), esc_url( 'https://dashboard.stripe.com/' ) )
    96147                        ),
    97148                    );
     
    152203                        ),
    153204                    );
     205                } elseif ( 'country' == $section ) {
     206
     207                    $fields[ $section ] = array(
     208                        'country'       => array(
     209                            'title'       => esc_html__( 'Account Country', 'stripe' ),
     210                            'type'        => 'select',
     211                            'options'     => simpay_get_country_list(),
     212                            'name'        => 'simpay_' . $this->option_group . '_' . $this->id . '[' . $section . '][country]',
     213                            'id'          => 'simpay-' . $this->option_group . '-' . $this->id . '-' . $section . '-country',
     214                            'value'       => $this->get_option_value( $section, 'country' ),
     215                            'description' => esc_html__( 'The country associated with the connected Stripe account.', 'stripe' ) . '<br />' . '<a href="https://dashboard.stripe.com/account">' . esc_html__( 'View your account settings', 'stripe' ),
     216                        ),
     217                    );
     218
    154219                }
    155220
  • stripe/trunk/includes/core/admin/pages/main.php

    r1851310 r2051367  
    176176    public static function get_form_settings( $action ) {
    177177
     178        global $post;
     179
    178180        switch ( $action ) {
    179181            case 'edit':
     
    188190                    break;
    189191                }
     192
    190193            case 'create':
    191194                {
     195                    // Add New is actually creating the payment form CPT record here.
    192196
    193197                    // Create post object
     
    198202                        'post_type'    => 'simple-pay',
    199203                    );
    200 
     204                   
    201205                    // Insert the post into the database
    202                     $form = wp_insert_post( $form_args );
    203 
    204                     $form = get_post( $form );
     206                    $form_id = wp_insert_post( $form_args );
     207
     208                    $form = get_post( $form_id );
     209
     210                    do_action( 'simpay_form_created', $form->ID );
    205211
    206212                    $form_action = esc_url( add_query_arg( array(
     
    213219                    break;
    214220                }
     221
    215222            default:
    216223                {
     
    221228        }
    222229
    223         global $post;
    224 
    225230        $post = $form;
    226231
    227232        setup_postdata( $post );
    228 
    229233        ?>
     234
    230235        <form id="post" method="post" action="<?php echo esc_attr( $form_action ); ?>">
    231236            <div id="poststuff">
  • stripe/trunk/includes/core/assets.php

    r1785812 r2051367  
    6161
    6262    /**
    63      * Setup arrays for both styles and scripts
     63     * Setup arrays for both scripts & styles.
    6464     */
    6565    public function setup() {
     
    7373                'deps'   => array(),
    7474                'ver'    => null,
    75                 'footer' => true,
    76             ),
    77             'simpay-jquery-validate' => array(
    78                 'src'    => $js_path . 'vendor/jquery.validate' . $this->min . '.js',
    79                 'deps'   => array( 'jquery' ),
    80                 'ver'    => SIMPLE_PAY_VERSION,
    8175                'footer' => true,
    8276            ),
     
    9791                'deps'   => array(
    9892                    'jquery',
    99                     'simpay-jquery-validate',
    10093                    'simpay-accounting',
    10194                    'simpay-shared',
     
    110103
    111104            $this->styles = array(
    112                 'stripe-checkout-button'     => array(
     105                'google-font-roboto'     => array(
     106                    'src'   => 'https://fonts.googleapis.com/css?family=Roboto',
     107                    'deps'  => array(),
     108                    'ver'   => null,
     109                    'media' => 'all',
     110                ),
     111                'stripe-checkout-button' => array(
    113112                    'src'   => 'https://checkout.stripe.com/v3/checkout/button.css',
    114113                    'deps'  => array(),
     
    116115                    'media' => 'all',
    117116                ),
    118                 'simpay-public'              => array(
     117                'simpay-public'          => array(
    119118                    'src'   => $css_path . 'public' . $this->min . '.css',
    120                     'deps'  => array( 'stripe-checkout-button' ),
     119                    'deps'  => array( 'google-font-roboto', 'stripe-checkout-button' ),
    121120                    'ver'   => SIMPLE_PAY_VERSION,
    122121                    'media' => 'all',
     
    127126
    128127    /**
    129      * Register the scripts and styles
     128     * Register scripts & styles
    130129     */
    131130    public function register() {
     
    154153
    155154    /**
    156      * Enqueue the scripts and styles
     155     * Enqueue registered scripts & styles
    157156     */
    158157    public function enqueue() {
  • stripe/trunk/includes/core/errors.php

    r1790989 r2051367  
    107107     * @return string
    108108     */
     109
     110    // TODO Used? Remove?
    109111    public static function get_error_html() {
    110112
  • stripe/trunk/includes/core/forms/default-form.php

    r1967366 r2051367  
    3232        parent::__construct( $id );
    3333
     34    }
     35
     36    /**
     37     * Add hooks and filters for this form instance.
     38     *
     39     * Hooks get run once per form instance. See https://github.com/wpsimplepay/WP-Simple-Pay-Pro-3/issues/617
     40     *
     41     */
     42    public function register_hooks() {
    3443        add_action( 'wp_footer', array( $this, 'set_script_variables' ), 0 );
     44        add_filter( 'simpay_form_' . $this->id . '_custom_fields', array( $this, 'get_custom_fields_html' ), 10, 2 );
    3545    }
    3646
     
    4353            'form'   => $this->get_form_script_variables(),
    4454            'stripe' => array_merge( array(
    45                 'amount' => $this->total_amount,
     55                'amount'  => $this->total_amount,
     56                'country' => $this->country,
    4657            ), $this->get_stripe_script_variables() ),
    4758        );
     
    5869    public function html() {
    5970
     71        $id                = 'simpay-form-' . $this->id;
     72        $form_display_type = simpay_get_saved_meta( $this->id, '_form_display_type' );
     73
     74        do_action( 'simpay_before_form_display', $this );
     75
     76        echo '<div id="simpay-' . $form_display_type . '-form-wrap-' . $this->id . '" class="simpay-' . $form_display_type . '-form-wrap simpay-form-wrap">';
     77
     78            do_action( 'simpay_form_' . absint( $this->id ) . '_before_payment_form', $this );
     79
     80            // Can add additional form tag attributes here using a filter.
     81            $more_form_atts = apply_filters( 'simpay_more_form_attributes', '' );
     82
     83            echo '<form action="" method="post" class="' . $this->get_form_classes( $this->id ) . '" id="' . esc_attr( $id ) . '" data-simpay-form-id="' . esc_attr( $this->id ) . '" ' . esc_attr( $more_form_atts ) . '>';
     84
     85                do_action( 'simpay_form_' . absint( $this->id ) . '_before_form_top', $this );
     86
     87                if ( ! empty( $this->custom_fields ) && is_array( $this->custom_fields ) ) {
     88                    echo $this->print_custom_fields();
     89                }
     90
     91                // Hidden inputs to hold the Stripe token properties (id & email) appended to the form in public.js.
     92
     93                // TODO Append these hidden inputs to form in public.js?
     94                echo '<input type="hidden" name="simpay_form_id" value="' . esc_attr( $this->id ) . '" />';
     95                echo '<input type="hidden" name="simpay_amount" value="" class="simpay-amount" />';
     96
     97                if ( $this->enable_shipping_address ) {
     98                    echo $this->shipping_fields();
     99                }
     100
     101                // Form validation error message container
     102                echo '<div class="simpay-errors" id="' . esc_attr( $id ) . '-error"></div>';
     103
     104                echo simpay_get_test_mode_badge();
     105
     106                do_action( 'simpay_form_' . absint( $this->id ) . '_before_form_bottom', $this );
     107
     108            // We echo the </form> instead of appending it so that the action hook can work correctly if they try to output something before the form close.
     109            echo '</form>';
     110
     111            do_action( 'simpay_form_' . absint( $this->id ) . '_after_form_display', $this );
     112
     113        echo '</div>'; // .simpay-{$form_display_type}-form-wrap
     114    }
     115
     116    private function get_form_classes( $id ) {
     117
     118        $classes = apply_filters( 'simpay_form_' . absint( $this->id ) . '_classes', array(
     119            'simpay-checkout-form',
     120            'simpay-form-' . absint( $this->id ),
     121        ) );
     122
     123        return trim( implode( ' ', array_map( 'trim', array_map( 'sanitize_html_class', array_unique( $classes ) ) ) ) );
     124
     125    }
     126
     127    /**
     128     * Print out the custom fields.
     129     *
     130     * @return string
     131     */
     132    public function print_custom_fields() {
     133
    60134        $html = '';
    61         $id   = 'simpay-form-' . $this->id;
    62 
    63         // Can add additional form tag attributes here using a filter.
    64         $more_form_atts = apply_filters( 'simpay_more_form_attributes', '' );
    65 
    66         $html .= '<form action="" method="post" class="simpay-checkout-form ' . esc_attr( $id ) . '" id="' . esc_attr( $id ) . '" data-simpay-form-id="' . esc_attr( $this->id ) . '" ' . esc_attr( $more_form_atts ) . '>';
    67135
    68136        if ( ! empty( $this->custom_fields ) && is_array( $this->custom_fields ) ) {
    69             $html .= $this->print_custom_fields();
    70         }
    71 
    72         $html .= '<input type="hidden" name="simpay_stripe_token" value="" class="simpay-stripe-token" />';
    73         $html .= '<input type="hidden" name="simpay_stripe_email" value="" class="simpay-stripe-email" />';
    74         $html .= '<input type="hidden" class="simpay_form_id" name="simpay_form_id" value="' . esc_attr( $this->id ) . '" />';
    75 
    76         $html .= '<input type="hidden" name="simpay_amount" value="" class="simpay-amount" />';
    77 
    78         if ( $this->enable_shipping_address ) {
    79             $html .= $this->shipping_fields();
    80         }
    81 
    82         do_action( 'simpay_before_form_display' );
    83 
    84         echo $html;
    85 
    86         do_action( 'simpay_before_form_close' );
    87 
    88         // We echo the </form> instead of appending it so that the action hook can work correctly if they try to output something before the form close.
    89         echo  '</form>';
    90 
    91         do_action( 'simpay_after_form_display' );
    92     }
    93 
    94     /**
    95      * Print out the custom fields.
    96      *
    97      * @return string
    98      */
    99     public function print_custom_fields() {
    100 
    101         $html = '';
    102 
    103         if ( ! empty( $this->custom_fields ) && is_array( $this->custom_fields ) ) {
     137
    104138            foreach ( $this->custom_fields as $k => $v ) {
    105 
    106                 switch ( $v['type'] ) {
    107                     case 'payment_button':
    108                         $html .= Fields\Payment_Button::html( $v );
    109                         break;
    110                     case has_filter( 'simpay_custom_fields' ):
    111                         $html .= apply_filters( 'simpay_custom_fields', $html, $v );
    112                         break;
    113                 }
     139   
     140                /*
     141                 * These filters are deprecated but still here for backwards compatibility
     142                 */
     143                $html = apply_filters( 'simpay_custom_field_html', $html, $v );
     144                $html = apply_filters( 'simpay_custom_fields', $html, $v );
    114145            }
    115146        }
     147
     148        $html = apply_filters( 'simpay_form_' . absint( $this->id ) . '_custom_fields', $html, $this );
     149        $html = apply_filters( 'simpay_form_custom_fields', $html, $this );
    116150
    117151        return $html;
     
    164198
    165199        $integers['integers'] = array(
    166             'amount'            => round( $this->amount ),
     200            'amount' => floatval( $this->amount ),
    167201        );
    168202
    169203        $strings['strings'] = array(
    170             'loadingText' => $loading_text,
     204            'loadingText' => $loading_text,
    171205        );
    172206
     
    175209        return $form_variables;
    176210    }
     211
     212    /**
     213     * Default custom fields handler.
     214     *
     215     * @since 3.4.0
     216     *
     217     * @param string $html Form HTML.
     218     * @param object $form The current form.
     219     * @return string $html Form HTML.
     220     */
     221    public function get_custom_fields_html( $html, $form ) {
     222        foreach ( $this->custom_fields as $key => $value ) {
     223            switch ( $value['type'] ) {
     224                case 'payment_button':
     225                    $html .= Fields\Payment_Button::html( $value );
     226                    break;
     227            }
     228        }
     229
     230        return $html;
     231    }
    177232}
  • stripe/trunk/includes/core/forms/fields/payment-button.php

    r1785812 r2051367  
    4242        $html .= '<button id="' . esc_attr( $id ) . '" class="' . self::get_payment_button_classes( $button_style ) . '"><span>' . esc_html( $text ) . '</span></button>';
    4343
    44         // Test mode badge placement
    45         if ( simpay_is_test_mode() ) {
    46             $html .= '<div class="simpay-test-mode-badge-container">';
    47             $html .= '<span class="simpay-test-mode-badge">' . esc_html__( 'Test Mode', 'stripe' ) . '</span>';
    48             $html .= '</div>';
    49         }
    50 
    5144        $html .= '</div>';
    5245
  • stripe/trunk/includes/core/functions/shared.php

    r1915991 r2051367  
    1212
    1313use SimplePay\Core\Abstracts\Form;
    14 
    15 // TODO Need function simpay_clean?
    16 
    17 /**
    18  * Clean variables using sanitize_text_field. Arrays are cleaned recursively.
    19  * Non-scalar values are ignored.
    20  *
    21  * @since  3.0
    22  * @param  string|array $var
    23  *
    24  * @return string|array
    25  */
    26 function simpay_clean( $var ) {
    27     if ( is_array( $var ) ) {
    28         return array_map( 'simpay_clean', $var );
    29     } else {
    30         return is_scalar( $var ) ? sanitize_text_field( $var ) : $var;
    31     }
    32 }
    3314
    3415/**
     
    171152        return apply_filters( $form_filter, $value );
    172153    } else {
    173         return apply_filters( 'simpay_' . $filter, $value );
     154        return apply_filters( 'simpay_' . $filter, $value, $form_id );
    174155    }
    175156}
     
    185166
    186167    if ( $formatted ) {
    187         return simpay_formatted_amount( simpay_get_setting( 'amount' ) );
     168        return simpay_format_currency( simpay_get_setting( 'amount' ) );
    188169    }
    189170
     
    237218 */
    238219function simpay_get_form( $object ) {
     220
     221    if( is_numeric( $object ) ) {
     222        $object = get_post( $object );
     223    }
     224
    239225    $objects = \SimplePay\Core\SimplePay()->objects;
    240226
     
    296282
    297283    return ( isset( $settings['mode']['test_mode'] ) && 'enabled' === $settings['mode']['test_mode'] );
     284}
     285
     286/**
     287 * Return test mode badge html if in test mode.
     288 *
     289 * @return string
     290 */
     291function simpay_get_test_mode_badge() {
     292    $html = '';
     293
     294    if ( simpay_is_test_mode() ) {
     295        $html .= '<div class="simpay-test-mode-badge-container">';
     296        $html .= '<span class="simpay-test-mode-badge">' . esc_html__( 'Test Mode', 'stripe' ) . '</span>';
     297        $html .= '</div>';
     298    }
     299
     300    return $html;
    298301}
    299302
     
    445448
    446449    $i18n['i18n'] = array(
    447         'mediaTitle'                      => esc_html__( 'Insert Media', 'stripe' ),
    448         'mediaButtonText'                 => esc_html__( 'Use Image', 'stripe' ),
     450        'mediaTitle'      => esc_html__( 'Insert Media', 'stripe' ),
     451        'mediaButtonText' => esc_html__( 'Use Image', 'stripe' ),
    449452    );
    450453
    451454    $integers['integers'] = array(
    452455        'decimalPlaces' => simpay_get_decimal_places(),
    453         'minAmount'     => simpay_get_stripe_minimum_amount(),
     456        'minAmount'     => simpay_global_minimum_amount(),
    454457    );
    455458
     
    505508
    506509/**
    507  * Convert an amount to cents.
    508  *
    509  * @param        $amount
    510  * @param string $decimal_separator
    511  * @param string $thousand_separator
    512  *
    513  * @return float|int
    514  */
    515 function simpay_convert_amount_to_cents( $amount, $decimal_separator = '', $thousand_separator = '' ) {
    516 
    517     $decimal_separator  = ( ! empty( $decimal_separator ) ? $decimal_separator : simpay_get_decimal_separator() );
    518     $thousand_separator = ( ! empty( $thousand_separator ) ? $thousand_separator : simpay_get_thousand_separator() );
    519 
    520     // Remove thousand separator
    521     $amount = str_replace( $thousand_separator, '', $amount );
    522 
    523     // Now replace decimal separator with an actual decimal point for processing purposes
    524     $amount = str_replace( $decimal_separator, '.', $amount );
    525 
    526     if ( simpay_is_zero_decimal() ) {
    527         return intval( $amount );
    528     } else {
    529         return floatval( $amount ) * 100;
    530     }
    531 
    532 }
    533 
    534 /**
    535510 * Get the thousands separator.
    536511 *
     
    596571
    597572/**
    598  * Get the Stripe minimum amount
    599  *
    600  * @param bool $cents
     573 * Return amount as number value.
     574 * Uses global (or filtered) decimal separator setting ("." or ",") & thousand separator setting.
     575 * Like accounting.unformat removes formatting/cruft first.
     576 * Respects decimal separator, but ignores zero decimal currency setting.
     577 * Also prevent negative values.
     578 * Similar to JS function unformatCurrency.
     579 *
     580 * @param string|float $amount
    601581 *
    602582 * @return float
    603583 */
    604 function simpay_get_stripe_minimum_amount( $cents = false ) {
    605 
    606     // Check if we want the number in cents or a formatted amount based on the zero decimal amount
    607     if ( $cents ) {
    608         $minimum = '50';
     584function simpay_unformat_currency( $amount ) {
     585
     586    // Remove thousand separator.
     587    $amount = str_replace( simpay_get_thousand_separator(), '', $amount );
     588
     589    // Replace decimal separator with an actual decimal point to allow converting to float.
     590    $amount = str_replace( simpay_get_decimal_separator(), '.', $amount );
     591
     592    return abs( floatval( $amount ) );
     593}
     594
     595/**
     596 * Convert from dollars to cents (in USD).
     597 * Leaves zero decimal currencies alone.
     598 * Similar to JS function convertToCents.
     599 *
     600 * @param string|float $amount
     601 *
     602 * @return int
     603 */
     604function simpay_convert_amount_to_cents( $amount ) {
     605
     606    $amount = simpay_unformat_currency( $amount );
     607
     608    if ( simpay_is_zero_decimal() ) {
     609        return intval( $amount );
    609610    } else {
    610         $minimum = simpay_is_zero_decimal() ? '50' : '.50';
    611     }
    612 
    613     return floatval( apply_filters( 'simpay_stripe_minimum_amount', $minimum ) );
    614 }
    615 
    616 /**
    617  * Return the formatted amount.
     611        return intval( $amount * 100 );
     612    }
     613}
     614
     615/**
     616 * Convert from cents to dollars (in USD).
     617 * Uses global zero decimal currency setting.
     618 * Leaves zero decimal currencies alone.
     619 * Similar to JS function convertToDollars.
     620 *
     621 * @param string|int $amount
     622 *
     623 * @return int|float
     624 */
     625function simpay_convert_amount_to_dollars( $amount ) {
     626
     627    $amount = simpay_unformat_currency( $amount );
     628
     629    if ( ! simpay_is_zero_decimal() ) {
     630        $amount = round( intval( $amount ) / 100, simpay_get_decimal_places() );
     631    }
     632
     633    return $amount;
     634}
     635
     636/**
     637 * Get the global system-wide minimum amount. Stripe dictates minimum USD is 50 cents, but set to 100 cents/currency
     638 * units as it can vary from currency to currency.
     639 *
     640 * @return int
     641 */
     642function simpay_global_minimum_amount() {
     643
     644    // Initially set to 1.00 for non-zero decimal currencies (i.e. $1.00 USD).
     645    $amount = 1;
     646
     647    if ( simpay_is_zero_decimal() ) {
     648        $amount = 100;
     649    }
     650
     651    return floatval( apply_filters( 'simpay_global_minimum_amount', $amount ) );
     652}
     653
     654/**
     655 * Validate a statement subscription for a charge or plan.
     656 *
     657 * @since 3.4.0
     658 *
     659 * @param string $statement_description Statement description to validate.
     660 * @return mixed Description or null.
     661 */
     662function simpay_validate_statement_descriptor( $statement_descripor ) {
     663    $illegal = array( '<', '>', '"', "'", '*', '\\' );
     664
     665    // Remove slashes
     666    $descriptor = stripslashes( $statement_descripor );
     667
     668    // Remove illegal characters
     669    $descriptor = str_replace( $illegal, '', $descriptor );
     670
     671    // Trim to 22 characters max
     672    $descriptor = substr( $descriptor, 0, 22 );
     673
     674    return $descriptor;
     675}
     676
     677/**
     678 * Return amount as formatted string.
     679 * With or without currency symbol.
     680 * Used for labels & amount inputs in admin & front-end.
     681 * Uses global (or filtered) decimal separator setting ("." or ",") & thousand separator setting.
     682 * Similar to JS function formatCurrency.
    618683 *
    619684 * @param        $amount
    620685 * @param string $currency
    621686 * @param bool   $show_symbol
    622  * @param string $separator
    623687 *
    624688 * @return string
    625689 */
    626 function simpay_formatted_amount( $amount, $currency = '', $show_symbol = true, $separator = '' ) {
     690function simpay_format_currency( $amount, $currency = '', $show_symbol = true ) {
    627691
    628692    if ( empty( $currency ) ) {
    629         $symbol = simpay_get_currency_symbol( simpay_get_setting( 'currency' ) );
    630     } else {
    631         $symbol = simpay_get_currency_symbol( $currency );
    632     }
     693        $currency = simpay_get_setting( 'currency' );
     694    }
     695
     696    $symbol = simpay_get_currency_symbol( $currency );
    633697
    634698    $position = simpay_get_setting( 'currency_position' );
    635699
    636     // Non-zero
    637     if ( simpay_is_zero_decimal( $currency ) ) {
    638         $amount = number_format( intval( $amount ), 0, simpay_get_decimal_separator(), simpay_get_thousand_separator() );
    639     } else {
    640         $amount = number_format( floatval( $amount ) / 100, simpay_get_decimal_places(), simpay_get_decimal_separator(), simpay_get_thousand_separator() );
    641     }
    642 
    643     $amount = apply_filters( 'simpay_formatted_amount', $amount, $amount );
     700    $amount = number_format( floatval( $amount ), simpay_get_decimal_places(), simpay_get_decimal_separator(), simpay_get_thousand_separator() );
     701
     702    $amount = apply_filters( 'simpay_formatted_amount', $amount );
    644703
    645704    if ( $show_symbol ) {
     
    680739            $template .= '<strong>' . esc_html__( 'Payment Date:', 'stripe' ) . '</strong>' . ' {charge-date}' . "\n";
    681740            $template .= '<strong>' . esc_html__( 'Payment Amount: ', 'stripe' ) . '</strong>' . '{total-amount}' . "\n";
     741
    682742            return $template;
    683743        case has_filter( 'simpay_editor_template' ):
     
    872932    return apply_filters( 'simpay_currency_symbol', $currency_symbol, $currency );
    873933}
     934
     935/**
     936 * Insert an array key/value pair after a certain point in an existing associative array.
     937 *
     938 * @since 3.4.0
     939 *
     940 * @param $new_key  string The new key to use for $fields[ $section ][ $new_key ]
     941 * @param $value    array The array that holds the information for this settings array
     942 * @param $needle   string The key to find in the current array of fields
     943 * @param $haystack array The current array to search
     944 * @return array
     945 */
     946function simpay_add_to_array_after( $new_key, $value, $needle, $haystack ) {
     947    $split = array(); // The split off portion of the array after the key we want to insert after
     948    $new   = array(); // The new array will consist of the opposite of the split + the new element we want to add
     949
     950    if ( array_key_exists( $needle, $haystack ) ) {
     951        $offset = array_search( $needle, array_keys( $haystack ) );
     952
     953        $split = array_slice( $haystack, $offset + 1 );
     954        $new   = array_slice( $haystack, 0, $offset + 1 );
     955
     956        // Add the new element to the bottom
     957        $new[ $new_key ] = $value;
     958    }
     959
     960    return $new + $split;
     961}
  • stripe/trunk/includes/core/main.php

    r1851310 r2051367  
    9494        // Load core shared back-end & front-end functions.
    9595        require_once( SIMPLE_PAY_INC . 'core/functions/shared.php' );
     96        require_once( SIMPLE_PAY_INC . 'core/functions/countries.php' );
     97
     98        // Stripe Connect functionality.
     99        require_once( SIMPLE_PAY_INC . 'core/stripe-connect/functions.php' );
     100        require_once( SIMPLE_PAY_INC . 'core/stripe-connect/admin.php' );
    96101
    97102        // TODO Don't load sessions in admin after Pro multi-plan setup fee set/get is refactored.
  • stripe/trunk/includes/core/objects.php

    r1785812 r2051367  
    3333     * Get a specific form
    3434     *
    35      * @param $object
     35     * @param $object Post ID or post object
    3636     *
    3737     * @return false|null|Object
     
    4040
    4141        if ( is_int( $object ) ) {
    42             $post = get_post( $object );
    43             if ( $post ) {
    44                 return $this->get_object( apply_filters( 'simpay_form_object_type', 'default-form' ), 'form', $post );
    45             }
     42            $object = get_post( $object );
     43        }
     44   
     45        if ( $object ) {
     46            return $this->get_object( apply_filters( 'simpay_form_object_type', 'default-form' ), 'form', $object );
    4647        }
    4748
  • stripe/trunk/includes/core/payments/charge.php

    r1790989 r2051367  
    5656        );
    5757
    58         if ( ! empty( $simpay_form->statement_descriptor ) ) {
     58        if ( $simpay_form->statement_descriptor ) {
     59            $charge_args['statement_descriptor'] = simpay_validate_statement_descriptor( $simpay_form->statement_descriptor );
     60        }
    5961
    60             $illegal = array( '<', '>', '"', "'" );
     62        $stripe_account_id = simpay_get_account_id();
    6163
    62             // Remove slashes
    63             $descriptor = stripslashes( $simpay_form->statement_descriptor );
    64 
    65             // Remove illegal characters
    66             $descriptor = str_replace( $illegal, '', $descriptor );
    67 
    68             // Trim to 22 characters max
    69             $descriptor = substr( $descriptor, 0, 22 );
    70 
    71             $charge_args['statement_descriptor'] = $descriptor;
     64        if ( $stripe_account_id ) {
     65            $charge_args['stripe_account'] = $stripe_account_id;
    7266        }
    7367
  • stripe/trunk/includes/core/payments/customer.php

    r1967366 r2051367  
    4848
    4949            // Create and save a new customer with the appropriate data
    50             $this->customer = Stripe_API::request( 'Customer', 'create', apply_filters( 'simpay_stripe_customer_args', array(
    51                 'email' => $this->payment->get_email(),
    52                 'card'  => $this->payment->get_token(),
    53             ) ) );
     50            $this->customer = Stripe_API::request( 'Customer', 'create', array(
     51                'source' => $this->payment->get_token(),
     52                'email'  => $this->payment->get_email(),
     53            ) );
    5454        } else {
     55
    5556            // Retrieve a customer if one already exists
    5657            $this->customer = Stripe_API::request( 'Customer', 'retrieve', $customer_id );
     
    7576     * Get a specific customer by their ID
    7677     *
    77      * @param $id The unique customer ID
     78     * @param $id string The unique customer ID
    7879     *
    7980     * @return mixed Stripe Customer object
  • stripe/trunk/includes/core/payments/details.php

    r1797857 r2051367  
    3131
    3232    /**
    33      * Setup all the tags available in the Payment Confirmation editor
     33     * Setup all the tags available in the Payment Confirmation editor.
     34     * Convert all amounts from cents to dollars (100 = $1.00 USD) before displaying.
     35     * Values will be coming from Stripe in cents (non-decimal) format.
    3436     */
    3537    public function set_tags() {
     
    7072            'total-amount' => array(
    7173                'type'  => array( 'all' ),
    72                 'value' => isset( $this->payment->charge->amount ) ? simpay_formatted_amount( $this->payment->charge->amount, $this->payment->get_currency() ) : '',
     74                'value' => isset( $this->payment->charge->amount ) ? simpay_format_currency( simpay_convert_amount_to_dollars( $this->payment->charge->amount ), $this->payment->get_currency() ) : '',
    7375            ),
    7476        ), $this->payment );
  • stripe/trunk/includes/core/payments/payment.php

    r1915991 r2051367  
    9696        } else {
    9797            // Fallback to our set total amount
    98             $this->amount = $simpay_form->total_amount;
     98            $this->amount = $simpay_form->amount;
    9999        }
    100100
     
    103103
    104104        // Set token and email needed for charges
    105         $this->token = $_POST['simpay_stripe_token'];
    106         $this->email = $_POST['simpay_stripe_email'];
     105        $this->token = sanitize_text_field( $_POST['simpay_stripe_token'] );
     106        $this->email = sanitize_text_field( $_POST['simpay_stripe_email'] );
    107107
    108108        if ( $simpay_form->enable_shipping_address ) {
     
    167167        global $simpay_form;
    168168
    169         // TODO Convert form object to array and clean recursively before saving to session?
    170         // TODO Cast using `(array)` or use get_object_vars() ?
    171169        \SimplePay\Core\SimplePay()->session->set( 'simpay_form', $simpay_form );
    172         //\SimplePay\Core\SimplePay()->session->set( 'simpay_form', (array) simpay_clean( $simpay_form ) );
    173170    }
    174171
  • stripe/trunk/includes/core/payments/stripe-api.php

    r1851310 r2051367  
    2929
    3030        // Send our plugin info over with the API request
    31         Stripe::setAppInfo( SIMPLE_PAY_PLUGIN_NAME, SIMPLE_PAY_VERSION, SIMPLE_PAY_STORE_URL );
     31        Stripe::setAppInfo(
     32            sprintf( 'WordPress %s', SIMPLE_PAY_PLUGIN_NAME ),
     33            SIMPLE_PAY_VERSION,
     34            SIMPLE_PAY_STORE_URL,
     35            SIMPLE_PAY_STRIPE_PARTNER_ID
     36        );
    3237
    3338        // Send the API info over
     
    130135        if ( ! is_admin() && ! $simpay_doing_ajax ) {
    131136            Errors::set( $error_id, $error_message );
    132             wp_redirect( $simpay_form->payment_failure_page );
    133             exit;
     137
     138            if ( ! headers_sent() ) {
     139                wp_redirect( $simpay_form->payment_failure_page );
     140                exit;
     141            } else {
     142                return $error_message;
     143            }
    134144        } else {
    135145            return false;
  • stripe/trunk/includes/core/shortcodes.php

    r1851310 r2051367  
    4747     * @return string
    4848     */
     49
     50    // TODO Used? Remove?
    4951    public function print_errors( $attributes ) {
    5052
  • stripe/trunk/includes/old/stripe-checkout.php

    r1785812 r2051367  
    9292global $base_class;
    9393
     94/**
     95 * Determine if legacy settings need to be exposed.
     96 *
     97 * @since 2.1.0
     98 *
     99 * @return bool
     100 */
     101function simpay_lite_needs_legacy() {
     102    $settings_1 = get_option( 'sc_settings' );
     103    $settings_2 = get_option( 'simpay_settings_keys' );
     104
     105    $key_1 = isset( $settings_1['live_publish_key'] ) ? $settings_1['live_publish_key'] : false;
     106    $key_2 = isset( $settings_2['live_keys']['secret_key'] ) ? $settings_2['live_keys']['secret_key'] : false;
     107
     108    // Try Stripe Connect.
     109    if ( ! $key_2 ) {
     110        $key_2 = simpay_get_account_id();
     111    }
     112
     113    return $key_1 && ! $key_2;
     114}
     115
     116/**
     117 * Show a deprecation notice about 1.x shortcode/settings.
     118 */
     119function simpay_lite_deprecation_notice() {
     120    $notice_message = '<p><strong>' . __( 'An update to your settings is required!', 'stripe' ) . '</strong></p>';
     121    $notice_message .= '<p>' . __( 'It looks like you may still be relying on the legacy settings of this plugin. These settings will no longer work in the next update of Stripe Payments for WordPress.', 'stripe' ) . '</p>';
     122    $notice_message .= '<p>' . sprintf( __( 'Please %2$supdate your settings%1$s then %3$screate a new form%1$s to generate an updated shortcode to use on your pages.', 'stripe' ), '</a>', '<a href="' . admin_url( 'admin.php?page=simpay_settings' ) . '">', '<a href="' . admin_url( 'admin.php?page=simpay&action=create' ) . '">' ) . '</p>';
     123
     124    SimplePay\Core\Admin\Notices::print_notice( $notice_message );
     125}
     126
     127if ( ! simpay_lite_needs_legacy() ) {
     128    return;
     129}
     130
     131// Notice about code removal.
     132add_action( 'admin_notices', 'simpay_lite_deprecation_notice' );
     133
    94134// Let's get going finally!
    95135$base_class = Stripe_Checkout::get_instance();
  • stripe/trunk/includes/promos/promo-loader.php

    r1785812 r2051367  
    2121
    2222            // Checkout Overlay tab
    23             add_action( 'simpay_form_settings_meta_overlay_display_panel', array( $this, 'checkout_overlay_tab' ) );
     23            add_action( 'simpay_admin_after_stripe_checkout', array( $this, 'checkout_overlay_tab' ) );
    2424        }
    2525
  • stripe/trunk/includes/promos/views/generic-tab-promo.php

    r1785812 r2051367  
    11<h2><?php _e( 'Want to customize your payment forms even more?', 'stripe' ); ?></h2>
    22<p>
    3     <?php _e( 'By upgrading to WP Simple Pay Pro, you get access to powerful features such as custom fields, user-entered amounts, coupon codes, tax rate support, Stripe Subscriptions, and so much more!', 'stripe' ); ?>
     3    <?php _e( 'By upgrading to WP Simple Pay Pro, you get access to powerful features such as:', 'stripe' ); ?>
    44</p>
     5
     6<!-- Repeat this bulleted list in sidebar.php & generic-tab-promo.php -->
     7<ul>
     8    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Unlimited Custom Fields', 'stripe' ); ?></li>
     9    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'User-Entered Amounts', 'stripe' ); ?></li>
     10    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Coupon Codes', 'stripe' ); ?></li>
     11    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Embedded & Overlay Custom Forms', 'stripe' ); ?></li>
     12    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Apple & Google Pay (coming March 2019)', 'stripe' ); ?></li>
     13    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Stripe Subscription Support (Business license required)', 'stripe' ); ?></li>
     14</ul>
  • stripe/trunk/includes/promos/views/sidebar.php

    r1785812 r2051367  
    55            <div class="main">
    66                <p class="sidebar-heading centered">
    7                     <?php _e( "Additional features included in WP Simple Pay Pro", 'stripe' ); ?>
     7                    <?php _e( "Additional features included in<br />WP Simple Pay Pro", 'stripe' ); ?>
    88                </p>
    99
     10                <!-- Repeat this bulleted list in sidebar.php & generic-tab-promo.php -->
    1011                <ul>
    11                     <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Custom Fields', 'stripe' ); ?></li>
     12                    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Unlimited Custom Fields', 'stripe' ); ?></li>
    1213                    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'User-Entered Amounts', 'stripe' ); ?></li>
    1314                    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Coupon Codes', 'stripe' ); ?></li>
    14                     <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Tax Rate Support', 'stripe' ); ?></li>
    15                     <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Stripe Subscriptions', 'stripe' ); ?>*</li>
    16                     <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Subscription Installment Plans', 'stripe' ); ?>*</li>
    17                     <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Subscription Setup Fees', 'stripe' ); ?>*</li>
    18                     <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Subscription Trial Periods', 'stripe' ); ?>*</li>
     15                    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Embedded & Overlay Custom Forms', 'stripe' ); ?></li>
     16                    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Apple & Google Pay (coming March 2019)', 'stripe' ); ?></li>
     17                    <li><div class="dashicons dashicons-yes"></div> <?php _e( 'Stripe Subscription Support', 'stripe' ); ?>*</li>
    1918                </ul>
    2019
  • stripe/trunk/readme.txt

    r1967366 r2051367  
    11=== Stripe Payments for WordPress - WP Simple Pay ===
    2 Contributors: pderksen, mordauk, cklosows, sdavis2702, dgoldak, nickyoung87, nekojira
     2Contributors: pderksen, spencerfinnell, adamjlea, mordauk, cklosows, sdavis2702, dgoldak, nickyoung87, nekojira
    33Tags: stripe, payments, credit card, stripe payments, stripe checkout
    4 Requires at least: 4.7
    5 Tested up to: 4.9
    6 Stable tag: 2.0.12
     4Requires at least: 4.9
     5Tested up to: 5.1
     6Stable tag: 2.1.0
    77Requires PHP: 5.4
    88License: GPLv2 or later
     
    3636* Optionally verify zip/postal code without address
    3737* Support for 12 languages, 25 countries and 135+ currencies
     38* Stripe Connect support for easier setup and improved security
    3839* Translation ready
    3940* [AffiliateWP](https://affiliatewp.com/) integration
     
    4647* *Everything in Lite plus...*
    4748* Drag & drop form design controls
    48 * Custom fields to capture additional data
     49* Unlimited custom fields to capture additional data
    4950* Custom amounts - let customers enter an amount to pay
    5051* Coupon code support
    51 * Tax rate support
     52* Embedded & Overlay custom forms
     53* Apple & Google Pay (coming March 2019)
    5254* Stripe Subscription support
    5355* Subscription installment plans
     
    5557* Subscription trial periods
    5658* [Easy Pricing Tables](https://fatcatapps.com/easypricingtables/) integration
    57 * [MemberPress](https://memberpress.com/) integration
    5859* Priority email support with a 24-hour response time during business days
    5960
     
    109110
    110111== Changelog ==
     112
     113= 2.1.0 - March 15, 2018 =
     114
     115* New: You can now easily connect your Stripe account with Stripe Connect. See your settings page for more details.
     116* New: Enable ZIP/Postal Code verification by default on new forms.
     117* New: Allow "Company Name" value to be blank.
     118* New: Add "Country" setting in Stripe Setup settings to send with Stripe API requests.
     119* Fix: Delete extraneous options on uninstall routine.
     120* Fix: Prefix Stripe API request from library with "WordPress".
     121* Dev: Updated to Stripe PHP library v6.30.4.
     122* Dev: Updated to use Stripe API version 2019-02-19.
     123* Dev: Remove unused files.
    111124
    112125= 2.0.12 - November 1, 2018 =
  • stripe/trunk/stripe-checkout.php

    r1967366 r2051367  
    11<?php
    22/**
    3  * Plugin Name: WP Simple Pay (Lite Version)
     3 * Plugin Name: WP Simple Pay Lite
    44 * Plugin URI:  https://wpsimplepay.com
    55 * Description: Add high conversion Stripe payment forms to your WordPress site in minutes.
    66 * Author: WP Simple Pay
    77 * Author URI:  https://wpsimplepay.com
    8  * Version: 2.0.12
     8 * Version: 2.1.0
    99 * Text Domain: stripe
    1010 */
     
    2525 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    2626 *
    27  * Copyright 2014-2018 Moonstone Media Group. All rights reserved.
     27 * Copyright 2014-2019 Moonstone Media Group. All rights reserved.
    2828 */
    2929
     
    3434if ( ! defined( 'SIMPLE_PAY_VERSION' ) ) {
    3535
    36     define( 'SIMPLE_PAY_VERSION', '2.0.12' );
     36    define( 'SIMPLE_PAY_VERSION', '2.1.0' );
    3737
    3838    if ( ! defined( 'SIMPLE_PAY_PLUGIN_NAME' ) ) {
    39         define( 'SIMPLE_PAY_PLUGIN_NAME', 'WP Simple Pay' );
     39        define( 'SIMPLE_PAY_PLUGIN_NAME', 'WP Simple Pay Lite' );
    4040    }
    4141
    4242    // Stripe API version should be in 'YYYY-MM-DD' format.
    4343    if ( ! defined( 'SIMPLE_PAY_STRIPE_API_VERSION' ) ) {
    44         define( 'SIMPLE_PAY_STRIPE_API_VERSION', '2018-10-31' );
     44        define( 'SIMPLE_PAY_STRIPE_API_VERSION', '2019-02-19' );
    4545    }
    4646
     
    6767    if ( ! defined( 'SIMPLE_PAY_STORE_URL' ) ) {
    6868        define( 'SIMPLE_PAY_STORE_URL', 'https://wpsimplepay.com/' );
     69    }
     70
     71    if ( ! defined( 'SIMPLE_PAY_STRIPE_PARTNER_ID' ) ) {
     72        define( 'SIMPLE_PAY_STRIPE_PARTNER_ID', 'pp_partner_DKkf27LbiCjOYt' );
    6973    }
    7074
  • stripe/trunk/uninstall.php

    r1785812 r2051367  
    2525
    2626    // Remove misc options
     27    delete_option( 'simpay_use_php_sessions' );
    2728    delete_option( 'simpay_dismiss_ssl' );
    28     delete_option( 'simpay_preview_form_id' );
     29    delete_option( 'simpay_dismiss_dropping_php53_bitcoin' );
    2930
    3031    // Remove settings options
     
    3334    delete_option( 'simpay_settings_display' );
    3435    delete_option( 'simpay_settings_shipping_billing' );
     36
     37    // Remove legacy options
     38    delete_option( 'simpay_preview_form_id' );
    3539
    3640    // Delete form posts.
  • stripe/trunk/vendor/composer/autoload_psr4.php

    r1725154 r2051367  
    88return array(
    99    'Stripe\\' => array($vendorDir . '/stripe/stripe-php/lib'),
    10     'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
    1110);
  • stripe/trunk/vendor/composer/autoload_static.php

    r1785812 r2051367  
    1212            'Stripe\\' => 7,
    1313        ),
    14         'C' =>
    15         array (
    16             'Composer\\Installers\\' => 20,
    17         ),
    1814    );
    1915
     
    2218        array (
    2319            0 => __DIR__ . '/..' . '/stripe/stripe-php/lib',
    24         ),
    25         'Composer\\Installers\\' =>
    26         array (
    27             0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
    2820        ),
    2921    );
  • stripe/trunk/vendor/composer/installed.json

    r1967366 r2051367  
    11[
    22    {
    3         "name": "composer/installers",
    4         "version": "v1.6.0",
    5         "version_normalized": "1.6.0.0",
     3        "name": "stripe/stripe-php",
     4        "version": "v6.30.4",
     5        "version_normalized": "6.30.4.0",
    66        "source": {
    77            "type": "git",
    8             "url": "https://github.com/composer/installers.git",
    9             "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
     8            "url": "https://github.com/stripe/stripe-php.git",
     9            "reference": "0d9e2773b1df27d4f0c590b15bed3a1433e0414c"
    1010        },
    1111        "dist": {
    1212            "type": "zip",
    13             "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
    14             "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
    15             "shasum": ""
    16         },
    17         "require": {
    18             "composer-plugin-api": "^1.0"
    19         },
    20         "replace": {
    21             "roundcube/plugin-installer": "*",
    22             "shama/baton": "*"
    23         },
    24         "require-dev": {
    25             "composer/composer": "1.0.*@dev",
    26             "phpunit/phpunit": "^4.8.36"
    27         },
    28         "time": "2018-08-27T06:10:37+00:00",
    29         "type": "composer-plugin",
    30         "extra": {
    31             "class": "Composer\\Installers\\Plugin",
    32             "branch-alias": {
    33                 "dev-master": "1.0-dev"
    34             }
    35         },
    36         "installation-source": "dist",
    37         "autoload": {
    38             "psr-4": {
    39                 "Composer\\Installers\\": "src/Composer/Installers"
    40             }
    41         },
    42         "notification-url": "https://packagist.org/downloads/",
    43         "license": [
    44             "MIT"
    45         ],
    46         "authors": [
    47             {
    48                 "name": "Kyle Robinson Young",
    49                 "email": "kyle@dontkry.com",
    50                 "homepage": "https://github.com/shama"
    51             }
    52         ],
    53         "description": "A multi-framework Composer library installer",
    54         "homepage": "https://composer.github.io/installers/",
    55         "keywords": [
    56             "Craft",
    57             "Dolibarr",
    58             "Eliasis",
    59             "Hurad",
    60             "ImageCMS",
    61             "Kanboard",
    62             "Lan Management System",
    63             "MODX Evo",
    64             "Mautic",
    65             "Maya",
    66             "OXID",
    67             "Plentymarkets",
    68             "Porto",
    69             "RadPHP",
    70             "SMF",
    71             "Thelia",
    72             "WolfCMS",
    73             "agl",
    74             "aimeos",
    75             "annotatecms",
    76             "attogram",
    77             "bitrix",
    78             "cakephp",
    79             "chef",
    80             "cockpit",
    81             "codeigniter",
    82             "concrete5",
    83             "croogo",
    84             "dokuwiki",
    85             "drupal",
    86             "eZ Platform",
    87             "elgg",
    88             "expressionengine",
    89             "fuelphp",
    90             "grav",
    91             "installer",
    92             "itop",
    93             "joomla",
    94             "kohana",
    95             "laravel",
    96             "lavalite",
    97             "lithium",
    98             "magento",
    99             "majima",
    100             "mako",
    101             "mediawiki",
    102             "modulework",
    103             "modx",
    104             "moodle",
    105             "osclass",
    106             "phpbb",
    107             "piwik",
    108             "ppi",
    109             "puppet",
    110             "pxcms",
    111             "reindex",
    112             "roundcube",
    113             "shopware",
    114             "silverstripe",
    115             "sydes",
    116             "symfony",
    117             "typo3",
    118             "wordpress",
    119             "yawik",
    120             "zend",
    121             "zikula"
    122         ]
    123     },
    124     {
    125         "name": "stripe/stripe-php",
    126         "version": "v6.20.0",
    127         "version_normalized": "6.20.0.0",
    128         "source": {
    129             "type": "git",
    130             "url": "https://github.com/stripe/stripe-php.git",
    131             "reference": "eef8383c1b54417c470f3f60f14ffdd6f04773d4"
    132         },
    133         "dist": {
    134             "type": "zip",
    135             "url": "https://api.github.com/repos/stripe/stripe-php/zipball/eef8383c1b54417c470f3f60f14ffdd6f04773d4",
    136             "reference": "eef8383c1b54417c470f3f60f14ffdd6f04773d4",
     13            "url": "https://api.github.com/repos/stripe/stripe-php/zipball/0d9e2773b1df27d4f0c590b15bed3a1433e0414c",
     14            "reference": "0d9e2773b1df27d4f0c590b15bed3a1433e0414c",
    13715            "shasum": ""
    13816        },
     
    14624            "php-coveralls/php-coveralls": "1.*",
    14725            "phpunit/phpunit": "~4.0",
    148             "squizlabs/php_codesniffer": "~2.0"
     26            "squizlabs/php_codesniffer": "~2.0",
     27            "symfony/process": "~2.8"
    14928        },
    150         "time": "2018-10-30T17:02:13+00:00",
     29        "time": "2019-02-27T18:07:30+00:00",
    15130        "type": "library",
    15231        "extra": {
  • stripe/trunk/vendor/stripe/stripe-php/CHANGELOG.md

    r1967366 r2051367  
    11# Changelog
     2
     3## 6.30.4 - 2019-02-27
     4* [#602](https://github.com/stripe/stripe-php/pull/602) Add `subscription_schedule` to `Subscription` for PHPDoc.
     5
     6## 6.30.3 - 2019-02-26
     7* [#603](https://github.com/stripe/stripe-php/pull/603) Improve PHPDoc on the `Source` object to cover all types of Sources currently supported.
     8
     9## 6.30.2 - 2019-02-25
     10* [#601](https://github.com/stripe/stripe-php/pull/601) Fix PHPDoc across multiple resources and add support for new events.
     11
     12## 6.30.1 - 2019-02-16
     13* [#599](https://github.com/stripe/stripe-php/pull/599) Fix PHPDoc for `SubscriptionSchedule` and `SubscriptionScheduleRevision`
     14
     15## 6.30.0 - 2019-02-12
     16* [#590](https://github.com/stripe/stripe-php/pull/590) Add support for `SubscriptionSchedule` and `SubscriptionScheduleRevision`
     17
     18## 6.29.3 - 2019-01-31
     19* [#592](https://github.com/stripe/stripe-php/pull/592) Some more PHPDoc fixes
     20
     21## 6.29.2 - 2019-01-31
     22* [#591](https://github.com/stripe/stripe-php/pull/591) Fix PHPDoc for nested resources
     23
     24## 6.29.1 - 2019-01-25
     25* [#566](https://github.com/stripe/stripe-php/pull/566) Fix dangling message contents
     26* [#586](https://github.com/stripe/stripe-php/pull/586) Don't overwrite `CURLOPT_HTTP_VERSION` option
     27
     28## 6.29.0 - 2019-01-23
     29* [#579](https://github.com/stripe/stripe-php/pull/579) Rename `CheckoutSession` to `Session` and move it under the `Checkout` namespace. This is a breaking change, but we've reached out to affected merchants and all new merchants would use the new approach.
     30
     31## 6.28.1 - 2019-01-21
     32* [#580](https://github.com/stripe/stripe-php/pull/580) Properly serialize `individual` on `Account` objects
     33
     34## 6.28.0 - 2019-01-03
     35* [#576](https://github.com/stripe/stripe-php/pull/576) Add support for iterating directly over `Collection` instances
     36
     37## 6.27.0 - 2018-12-21
     38* [#571](https://github.com/stripe/stripe-php/pull/571) Add support for the `CheckoutSession` resource
     39
     40## 6.26.0 - 2018-12-11
     41* [#568](https://github.com/stripe/stripe-php/pull/568) Enable persistent connections
     42
     43## 6.25.0 - 2018-12-10
     44* [#567](https://github.com/stripe/stripe-php/pull/567) Add support for account links
     45
     46## 6.24.0 - 2018-11-28
     47* [#562](https://github.com/stripe/stripe-php/pull/562) Add support for the Review resource
     48* [#564](https://github.com/stripe/stripe-php/pull/564) Add event name constants for subscription schedule aborted/expiring
     49
     50## 6.23.0 - 2018-11-27
     51* [#542](https://github.com/stripe/stripe-php/pull/542) Add support for `ValueList` and `ValueListItem` for Radar
     52
     53## 6.22.1 - 2018-11-20
     54* [#561](https://github.com/stripe/stripe-php/pull/561) Add cast and some docs to telemetry introduced in 6.22.0/#549
     55
     56## 6.22.0 - 2018-11-15
     57* [#549](https://github.com/stripe/stripe-php/pull/549) Add support for client telemetry
     58
     59## 6.21.1 - 2018-11-12
     60* [#548](https://github.com/stripe/stripe-php/pull/548) Don't mutate `Exception` class properties from `OAuthBase` error
     61
     62## 6.21.0 - 2018-11-08
     63* [#537](https://github.com/stripe/stripe-php/pull/537) Add new API endpoints for the `Invoice` resource.
     64
     65## 6.20.1 - 2018-11-07
     66* [#546](https://github.com/stripe/stripe-php/pull/546) Drop files from the Composer package that aren't needed in the release
    267
    368## 6.20.0 - 2018-10-30
  • stripe/trunk/vendor/stripe/stripe-php/LICENSE

    r1365533 r2051367  
    11The MIT License
    22
    3 Copyright (c) 2010-2015 Stripe
     3Copyright (c) 2010-2019 Stripe, Inc. (https://stripe.com)
    44
    55Permission is hereby granted, free of charge, to any person obtaining a copy
  • stripe/trunk/vendor/stripe/stripe-php/VERSION

    r1967366 r2051367  
    1 6.20.0
     16.30.4
  • stripe/trunk/vendor/stripe/stripe-php/composer.json

    r1967366 r2051367  
    2424    "phpunit/phpunit": "~4.0",
    2525    "php-coveralls/php-coveralls": "1.*",
    26     "squizlabs/php_codesniffer": "~2.0"
     26    "squizlabs/php_codesniffer": "~2.0",
     27    "symfony/process": "~2.8"
    2728  },
    2829  "autoload": {
  • stripe/trunk/vendor/stripe/stripe-php/init.php

    r1967366 r2051367  
    5050// Plumbing
    5151require(dirname(__FILE__) . '/lib/ApiResponse.php');
     52require(dirname(__FILE__) . '/lib/RequestTelemetry.php');
    5253require(dirname(__FILE__) . '/lib/StripeObject.php');
    5354require(dirname(__FILE__) . '/lib/ApiRequestor.php');
     
    5758// Stripe API Resources
    5859require(dirname(__FILE__) . '/lib/Account.php');
     60require(dirname(__FILE__) . '/lib/AccountLink.php');
    5961require(dirname(__FILE__) . '/lib/AlipayAccount.php');
    6062require(dirname(__FILE__) . '/lib/ApplePayDomain.php');
     
    6870require(dirname(__FILE__) . '/lib/Card.php');
    6971require(dirname(__FILE__) . '/lib/Charge.php');
     72require(dirname(__FILE__) . '/lib/Checkout/Session.php');
    7073require(dirname(__FILE__) . '/lib/Collection.php');
    7174require(dirname(__FILE__) . '/lib/CountrySpec.php');
     
    99102require(dirname(__FILE__) . '/lib/Plan.php');
    100103require(dirname(__FILE__) . '/lib/Product.php');
     104require(dirname(__FILE__) . '/lib/Radar/ValueList.php');
     105require(dirname(__FILE__) . '/lib/Radar/ValueListItem.php');
    101106require(dirname(__FILE__) . '/lib/Recipient.php');
    102107require(dirname(__FILE__) . '/lib/RecipientTransfer.php');
     
    104109require(dirname(__FILE__) . '/lib/Reporting/ReportRun.php');
    105110require(dirname(__FILE__) . '/lib/Reporting/ReportType.php');
     111require(dirname(__FILE__) . '/lib/Review.php');
    106112require(dirname(__FILE__) . '/lib/SKU.php');
    107113require(dirname(__FILE__) . '/lib/Sigma/ScheduledQueryRun.php');
     
    110116require(dirname(__FILE__) . '/lib/Subscription.php');
    111117require(dirname(__FILE__) . '/lib/SubscriptionItem.php');
     118require(dirname(__FILE__) . '/lib/SubscriptionSchedule.php');
     119require(dirname(__FILE__) . '/lib/SubscriptionScheduleRevision.php');
    112120require(dirname(__FILE__) . '/lib/Terminal/ConnectionToken.php');
    113121require(dirname(__FILE__) . '/lib/Terminal/Location.php');
  • stripe/trunk/vendor/stripe/stripe-php/lib/Account.php

    r1967366 r2051367  
    88 * @property string $id
    99 * @property string $object
    10  * @property string $business_logo
    11  * @property string $business_name
    12  * @property string $business_primary_color
    13  * @property string $business_url
     10 * @property mixed $business_profile
     11 * @property string $business_type
     12 * @property mixed $capabilities
    1413 * @property bool $charges_enabled
     14 * @property mixed $company
    1515 * @property string $country
    1616 * @property int $created
    17  * @property bool $debit_negative_balances
    18  * @property mixed $decline_charge_on
    1917 * @property string $default_currency
    2018 * @property bool $details_submitted
    21  * @property string $display_name
    2219 * @property string $email
    2320 * @property Collection $external_accounts
    24  * @property mixed $legal_entity
     21 * @property mixed $individual
    2522 * @property StripeObject $metadata
    26  * @property mixed $payout_schedule
    27  * @property string $payout_statement_descriptor
    2823 * @property bool $payouts_enabled
    29  * @property string $product_description
    30  * @property string $statement_descriptor
    31  * @property mixed $support_address
    32  * @property string $support_email
    33  * @property string $support_phone
    34  * @property string $support_url
    35  * @property string $timezone
     24 * @property mixed $requirements
     25 * @property mixed $settings
    3626 * @property mixed $tos_acceptance
    3727 * @property string $type
    38  * @property mixed $verification
    3928 *
    4029 * @package Stripe
     
    140129
    141130    /**
    142      * @param array|null $id The ID of the account on which to create the external account.
     131     * @param string|null $id The ID of the account on which to create the external account.
    143132     * @param array|null $params
    144133     * @param array|string|null $opts
     
    152141
    153142    /**
    154      * @param array|null $id The ID of the account to which the external account belongs.
     143     * @param string|null $id The ID of the account to which the external account belongs.
    155144     * @param array|null $externalAccountId The ID of the external account to retrieve.
    156145     * @param array|null $params
     
    165154
    166155    /**
    167      * @param array|null $id The ID of the account to which the external account belongs.
     156     * @param string|null $id The ID of the account to which the external account belongs.
    168157     * @param array|null $externalAccountId The ID of the external account to update.
    169158     * @param array|null $params
     
    178167
    179168    /**
    180      * @param array|null $id The ID of the account to which the external account belongs.
     169     * @param string|null $id The ID of the account to which the external account belongs.
    181170     * @param array|null $externalAccountId The ID of the external account to delete.
    182171     * @param array|null $params
     
    191180
    192181    /**
    193      * @param array|null $id The ID of the account on which to retrieve the external accounts.
     182     * @param string|null $id The ID of the account on which to retrieve the external accounts.
    194183     * @param array|null $params
    195184     * @param array|string|null $opts
     
    203192
    204193    /**
    205      * @param array|null $id The ID of the account on which to create the login link.
     194     * @param string|null $id The ID of the account on which to create the login link.
    206195     * @param array|null $params
    207196     * @param array|string|null $opts
     
    215204
    216205    /**
    217      * @param array|null $id The ID of the account on which to create the person.
     206     * @param string|null $id The ID of the account on which to create the person.
    218207     * @param array|null $params
    219208     * @param array|string|null $opts
     
    227216
    228217    /**
    229      * @param array|null $id The ID of the account to which the person belongs.
     218     * @param string|null $id The ID of the account to which the person belongs.
    230219     * @param array|null $personId The ID of the person to retrieve.
    231220     * @param array|null $params
     
    240229
    241230    /**
    242      * @param array|null $id The ID of the account to which the person belongs.
     231     * @param string|null $id The ID of the account to which the person belongs.
    243232     * @param array|null $personId The ID of the person to update.
    244233     * @param array|null $params
     
    253242
    254243    /**
    255      * @param array|null $id The ID of the account to which the person belongs.
     244     * @param string|null $id The ID of the account to which the person belongs.
    256245     * @param array|null $personId The ID of the person to delete.
    257246     * @param array|null $params
     
    266255
    267256    /**
    268      * @param array|null $id The ID of the account on which to retrieve the persons.
     257     * @param string|null $id The ID of the account on which to retrieve the persons.
    269258     * @param array|null $params
    270259     * @param array|string|null $opts
     
    289278            }
    290279        }
     280        if (isset($this->_values['individual'])) {
     281            $individual = $this['individual'];
     282            if (($individual instanceof Person) && !isset($update['individual'])) {
     283                $update['individual'] = $individual->serializeParameters($force);
     284            }
     285        }
    291286        return $update;
    292287    }
  • stripe/trunk/vendor/stripe/stripe-php/lib/ApiOperations/NestedResource.php

    r1878801 r2051367  
    6161     * @param string $id
    6262     * @param string $nestedPath
     63     * @param string|null $nestedId
    6364     * @param array|null $params
    6465     * @param array|string|null $options
     
    7576     * @param string $id
    7677     * @param string $nestedPath
     78     * @param string|null $nestedId
    7779     * @param array|null $params
    7880     * @param array|string|null $options
     
    8991     * @param string $id
    9092     * @param string $nestedPath
     93     * @param string|null $nestedId
    9194     * @param array|null $params
    9295     * @param array|string|null $options
  • stripe/trunk/vendor/stripe/stripe-php/lib/ApiRequestor.php

    r1915991 r2051367  
    2626
    2727    /**
     28     * @var RequestTelemetry
     29     */
     30    private static $requestTelemetry;
     31
     32    /**
    2833     * ApiRequestor constructor.
    2934     *
     
    3843        }
    3944        $this->_apiBase = $apiBase;
     45    }
     46
     47    /**
     48     * Creates a telemetry json blob for use in 'X-Stripe-Client-Telemetry' headers
     49     * @static
     50     *
     51     * @param RequestTelemetry $requestTelemetry
     52     * @return string
     53     */
     54    private static function _telemetryJson($requestTelemetry)
     55    {
     56        $payload = array(
     57            'last_request_metrics' => array(
     58                'request_id' => $requestTelemetry->requestId,
     59                'request_duration_ms' => $requestTelemetry->requestDuration,
     60        ));
     61
     62        $result = json_encode($payload);
     63        if ($result != false) {
     64            return $result;
     65        } else {
     66            Stripe::getLogger()->error("Serializing telemetry payload failed!");
     67            return "{}";
     68        }
    4069    }
    4170
     
    333362        }
    334363
     364        if (Stripe::$enableTelemetry && self::$requestTelemetry != null) {
     365            $defaultHeaders["X-Stripe-Client-Telemetry"] = self::_telemetryJson(self::$requestTelemetry);
     366        }
     367
    335368        $hasFile = false;
    336369        $hasCurlFile = class_exists('\CURLFile', false);
     
    357390        }
    358391
     392        $requestStartMs = Util\Util::currentTimeMillis();
     393
    359394        list($rbody, $rcode, $rheaders) = $this->httpClient()->request(
    360395            $method,
     
    364399            $hasFile
    365400        );
     401
     402        if (array_key_exists('request-id', $rheaders)) {
     403            self::$requestTelemetry = new RequestTelemetry(
     404                $rheaders['request-id'],
     405                Util\Util::currentTimeMillis() - $requestStartMs
     406            );
     407        }
     408
    366409        return [$rbody, $rcode, $rheaders, $myApiKey];
    367410    }
     
    444487
    445488    /**
     489     * @static
     490     *
     491     * Resets any stateful telemetry data
     492     */
     493    public static function resetTelemetry()
     494    {
     495        self::$requestTelemetry = null;
     496    }
     497
     498    /**
    446499     * @return HttpClient\ClientInterface
    447500     */
  • stripe/trunk/vendor/stripe/stripe-php/lib/ApplicationFee.php

    r1915991 r2051367  
    4848
    4949    /**
    50      * @param array|null $id The ID of the application fee on which to create the refund.
     50     * @param string|null $id The ID of the application fee on which to create the refund.
    5151     * @param array|null $params
    5252     * @param array|string|null $opts
     
    6060
    6161    /**
    62      * @param array|null $id The ID of the application fee to which the refund belongs.
     62     * @param string|null $id The ID of the application fee to which the refund belongs.
    6363     * @param array|null $refundId The ID of the refund to retrieve.
    6464     * @param array|null $params
     
    7373
    7474    /**
    75      * @param array|null $id The ID of the application fee to which the refund belongs.
     75     * @param string|null $id The ID of the application fee to which the refund belongs.
    7676     * @param array|null $refundId The ID of the refund to update.
    7777     * @param array|null $params
     
    8686
    8787    /**
    88      * @param array|null $id The ID of the application fee on which to retrieve the refunds.
     88     * @param string|null $id The ID of the application fee on which to retrieve the refunds.
    8989     * @param array|null $params
    9090     * @param array|string|null $opts
  • stripe/trunk/vendor/stripe/stripe-php/lib/Card.php

    r1915991 r2051367  
    1717 * @property string $address_zip
    1818 * @property string $address_zip_check
    19  * @property array $available_payout_methods
     19 * @property string[] $available_payout_methods
    2020 * @property string $brand
    2121 * @property string $country
     
    8383        $msg = "Cards cannot be accessed without a customer, recipient or account ID. " .
    8484               "Retrieve a card using \$customer->sources->retrieve('card_id'), " .
    85                "\$recipient->cards->retrieve('card_id'), or";
     85               "\$recipient->cards->retrieve('card_id'), or " .
    8686               "\$account->external_accounts->retrieve('card_id') instead.";
    8787        throw new Error\InvalidRequest($msg, null);
     
    9999        $msg = "Cards cannot be accessed without a customer, recipient or account ID. " .
    100100               "Call save() on \$customer->sources->retrieve('card_id'), " .
    101                "\$recipient->cards->retrieve('card_id'), or";
     101               "\$recipient->cards->retrieve('card_id'), or " .
    102102               "\$account->external_accounts->retrieve('card_id') instead.";
    103103        throw new Error\InvalidRequest($msg, null);
  • stripe/trunk/vendor/stripe/stripe-php/lib/Charge.php

    r1967366 r2051367  
    3333 * @property string $receipt_email
    3434 * @property string $receipt_number
     35 * @property string $receipt_url
    3536 * @property bool $refunded
    3637 * @property Collection $refunds
     
    4243 * @property string $status
    4344 * @property string $transfer
     45 * @property mixed $transfer_data
    4446 * @property string $transfer_group
    4547 *
  • stripe/trunk/vendor/stripe/stripe-php/lib/Collection.php

    r1915991 r2051367  
    1313 * @package Stripe
    1414 */
    15 class Collection extends StripeObject
     15class Collection extends StripeObject implements \IteratorAggregate
    1616{
    1717
     
    7070
    7171    /**
     72     * @return \ArrayIterator An iterator that can be used to iterate
     73     *    across objects in the current page.
     74     */
     75    public function getIterator()
     76    {
     77        return new \ArrayIterator($this->data);
     78    }
     79
     80    /**
    7281     * @return Util\AutoPagingIterator An iterator that can be used to iterate
    7382     *    across all objects across all pages. As page boundaries are
  • stripe/trunk/vendor/stripe/stripe-php/lib/Customer.php

    r1967366 r2051367  
    99 * @property string $object
    1010 * @property int $account_balance
    11  * @property string $business_vat_id
    1211 * @property string $created
    1312 * @property string $currency
     
    1817 * @property string $email
    1918 * @property string $invoice_prefix
     19 * @property mixed $invoice_settings
    2020 * @property bool $livemode
    2121 * @property StripeObject $metadata
     
    142142
    143143    /**
    144      * @param array|null $id The ID of the customer on which to create the source.
     144     * @param string|null $id The ID of the customer on which to create the source.
    145145     * @param array|null $params
    146146     * @param array|string|null $opts
     
    154154
    155155    /**
    156      * @param array|null $id The ID of the customer to which the source belongs.
    157      * @param array|null $sourceId The ID of the source to retrieve.
     156     * @param string|null $id The ID of the customer to which the source belongs.
     157     * @param string|null $sourceId The ID of the source to retrieve.
    158158     * @param array|null $params
    159159     * @param array|string|null $opts
     
    167167
    168168    /**
    169      * @param array|null $id The ID of the customer to which the source belongs.
    170      * @param array|null $sourceId The ID of the source to update.
     169     * @param string|null $id The ID of the customer to which the source belongs.
     170     * @param string|null $sourceId The ID of the source to update.
    171171     * @param array|null $params
    172172     * @param array|string|null $opts
     
    180180
    181181    /**
    182      * @param array|null $id The ID of the customer to which the source belongs.
    183      * @param array|null $sourceId The ID of the source to delete.
     182     * @param string|null $id The ID of the customer to which the source belongs.
     183     * @param string|null $sourceId The ID of the source to delete.
    184184     * @param array|null $params
    185185     * @param array|string|null $opts
     
    193193
    194194    /**
    195      * @param array|null $id The ID of the customer on which to retrieve the sources.
     195     * @param string|null $id The ID of the customer on which to retrieve the sources.
    196196     * @param array|null $params
    197197     * @param array|string|null $opts
  • stripe/trunk/vendor/stripe/stripe-php/lib/Error/OAuth/OAuthBase.php

    r1725154 r2051367  
    1414    ) {
    1515        parent::__construct($description, $httpStatus, $httpBody, $jsonBody, $httpHeaders);
    16         $this->code = $code;
     16        $this->errorCode = $code;
    1717    }
    1818
    1919    public function getErrorCode()
    2020    {
    21         return $this->code;
     21        return $this->errorCode;
    2222    }
    2323}
  • stripe/trunk/vendor/stripe/stripe-php/lib/Event.php

    r1915991 r2051367  
    1010 * @property string $account
    1111 * @property string $api_version
    12  * @property int $created
    13  * @property mixed $data
    14  * @property bool $livemode
    15  * @property int $pending_webhooks
    16  * @property mixed $request
     12 * @property int    $created
     13 * @property mixed  $data
     14 * @property bool   $livemode
     15 * @property int    $pending_webhooks
     16 * @property mixed  $request
    1717 * @property string $type
    1818 *
     
    2424    const OBJECT_NAME = "event";
    2525
    26      /**
     26    /**
    2727     * Possible string representations of event types.
    2828     * @link https://stripe.com/docs/api#event_types
    2929     */
    30     const ACCOUNT_UPDATED                      = 'account.updated';
    31     const ACCOUNT_APPLICATION_DEAUTHORIZED     = 'account.application.deauthorized';
    32     const ACCOUNT_EXTERNAL_ACCOUNT_CREATED     = 'account.external_account.created';
    33     const ACCOUNT_EXTERNAL_ACCOUNT_DELETED     = 'account.external_account.deleted';
    34     const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED     = 'account.external_account.updated';
    35     const APPLICATION_FEE_CREATED              = 'application_fee.created';
    36     const APPLICATION_FEE_REFUNDED             = 'application_fee.refunded';
    37     const APPLICATION_FEE_REFUND_UPDATED       = 'application_fee.refund.updated';
    38     const BALANCE_AVAILABLE                    = 'balance.available';
    39     const CHARGE_CAPTURED                      = 'charge.captured';
    40     const CHARGE_EXPIRED                       = 'charge.expired';
    41     const CHARGE_FAILED                        = 'charge.failed';
    42     const CHARGE_PENDING                       = 'charge.pending';
    43     const CHARGE_REFUNDED                      = 'charge.refunded';
    44     const CHARGE_SUCCEEDED                     = 'charge.succeeded';
    45     const CHARGE_UPDATED                       = 'charge.updated';
    46     const CHARGE_DISPUTE_CLOSED                = 'charge.dispute.closed';
    47     const CHARGE_DISPUTE_CREATED               = 'charge.dispute.created';
    48     const CHARGE_DISPUTE_FUNDS_REINSTATED      = 'charge.dispute.funds_reinstated';
    49     const CHARGE_DISPUTE_FUNDS_WITHDRAWN       = 'charge.dispute.funds_withdrawn';
    50     const CHARGE_DISPUTE_UPDATED               = 'charge.dispute.updated';
    51     const CHARGE_REFUND_UPDATED                = 'charge.refund.updated';
    52     const COUPON_CREATED                       = 'coupon.created';
    53     const COUPON_DELETED                       = 'coupon.deleted';
    54     const COUPON_UPDATED                       = 'coupon.updated';
    55     const CUSTOMER_CREATED                     = 'customer.created';
    56     const CUSTOMER_DELETED                     = 'customer.deleted';
    57     const CUSTOMER_UPDATED                     = 'customer.updated';
    58     const CUSTOMER_DISCOUNT_CREATED            = 'customer.discount.created';
    59     const CUSTOMER_DISCOUNT_DELETED            = 'customer.discount.deleted';
    60     const CUSTOMER_DISCOUNT_UPDATED            = 'customer.discount.updated';
    61     const CUSTOMER_SOURCE_CREATED              = 'customer.source.created';
    62     const CUSTOMER_SOURCE_DELETED              = 'customer.source.deleted';
    63     const CUSTOMER_SOURCE_EXPIRING             = 'customer.source.expiring';
    64     const CUSTOMER_SOURCE_UPDATED              = 'customer.source.updated';
    65     const CUSTOMER_SUBSCRIPTION_CREATED        = 'customer.subscription.created';
    66     const CUSTOMER_SUBSCRIPTION_DELETED        = 'customer.subscription.deleted';
    67     const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end';
    68     const CUSTOMER_SUBSCRIPTION_UPDATED        = 'customer.subscription.updated';
    69     const FILE_CREATED                         = 'file.created';
    70     const INVOICE_CREATED                      = 'invoice.created';
    71     const INVOICE_PAYMENT_FAILED               = 'invoice.payment_failed';
    72     const INVOICE_PAYMENT_SUCCEEDED            = 'invoice.payment_succeeded';
    73     const INVOICE_SENT                         = 'invoice.sent';
    74     const INVOICE_UPCOMING                     = 'invoice.upcoming';
    75     const INVOICE_UPDATED                      = 'invoice.updated';
    76     const INVOICEITEM_CREATED                  = 'invoiceitem.created';
    77     const INVOICEITEM_DELETED                  = 'invoiceitem.deleted';
    78     const INVOICEITEM_UPDATED                  = 'invoiceitem.updated';
    79     const ORDER_CREATED                        = 'order.created';
    80     const ORDER_PAYMENT_FAILED                 = 'order.payment_failed';
    81     const ORDER_PAYMENT_SUCCEEDED              = 'order.payment_succeeded';
    82     const ORDER_UPDATED                        = 'order.updated';
    83     const ORDER_RETURN_CREATED                 = 'order_return.created';
    84     const PAYOUT_CANCELED                      = 'payout.canceled';
    85     const PAYOUT_CREATED                       = 'payout.created';
    86     const PAYOUT_FAILED                        = 'payout.failed';
    87     const PAYOUT_PAID                          = 'payout.paid';
    88     const PAYOUT_UPDATED                       = 'payout.updated';
    89     const PING                                 = 'ping';
    90     const PLAN_CREATED                         = 'plan.created';
    91     const PLAN_DELETED                         = 'plan.deleted';
    92     const PLAN_UPDATED                         = 'plan.updated';
    93     const PRODUCT_CREATED                      = 'product.created';
    94     const PRODUCT_DELETED                      = 'product.deleted';
    95     const PRODUCT_UPDATED                      = 'product.updated';
    96     const RECIPIENT_CREATED                    = 'recipient.created';
    97     const RECIPIENT_DELETED                    = 'recipient.deleted';
    98     const RECIPIENT_UPDATED                    = 'recipient.updated';
    99     const REVIEW_CLOSED                        = 'review.closed';
    100     const REVIEW_OPENED                        = 'review.opened';
    101     const SIGMA_SCHEDULED_QUERY_RUN_CREATED    = 'sigma.scheduled_query_run.created';
    102     const SKU_CREATED                          = 'sku.created';
    103     const SKU_DELETED                          = 'sku.deleted';
    104     const SKU_UPDATED                          = 'sku.updated';
    105     const SOURCE_CANCELED                      = 'source.canceled';
    106     const SOURCE_CHARGEABLE                    = 'source.chargeable';
    107     const SOURCE_FAILED                        = 'source.failed';
    108     const SOURCE_MANDATE_NOTIFICATION          = 'source.mandate_notification';
    109     const SOURCE_TRANSACTION_CREATED           = 'source.transaction.created';
    110     const TOPUP_CREATED                        = 'topup.created';
    111     const TOPUP_FAILED                         = 'topup.failed';
    112     const TOPUP_SUCCEEDED                      = 'topup.succeeded';
    113     const TRANSFER_CREATED                     = 'transfer.created';
    114     const TRANSFER_REVERSED                    = 'transfer.reversed';
    115     const TRANSFER_UPDATED                     = 'transfer.updated';
     30    const ACCOUNT_UPDATED                          = 'account.updated';
     31    const ACCOUNT_APPLICATION_AUTHORIZED           = 'account.application.authorized';
     32    const ACCOUNT_APPLICATION_DEAUTHORIZED         = 'account.application.deauthorized';
     33    const ACCOUNT_EXTERNAL_ACCOUNT_CREATED         = 'account.external_account.created';
     34    const ACCOUNT_EXTERNAL_ACCOUNT_DELETED         = 'account.external_account.deleted';
     35    const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED         = 'account.external_account.updated';
     36    const APPLICATION_FEE_CREATED                  = 'application_fee.created';
     37    const APPLICATION_FEE_REFUNDED                 = 'application_fee.refunded';
     38    const APPLICATION_FEE_REFUND_UPDATED           = 'application_fee.refund.updated';
     39    const BALANCE_AVAILABLE                        = 'balance.available';
     40    const CHARGE_CAPTURED                          = 'charge.captured';
     41    const CHARGE_EXPIRED                           = 'charge.expired';
     42    const CHARGE_FAILED                            = 'charge.failed';
     43    const CHARGE_PENDING                           = 'charge.pending';
     44    const CHARGE_REFUNDED                          = 'charge.refunded';
     45    const CHARGE_SUCCEEDED                         = 'charge.succeeded';
     46    const CHARGE_UPDATED                           = 'charge.updated';
     47    const CHARGE_DISPUTE_CLOSED                    = 'charge.dispute.closed';
     48    const CHARGE_DISPUTE_CREATED                   = 'charge.dispute.created';
     49    const CHARGE_DISPUTE_FUNDS_REINSTATED          = 'charge.dispute.funds_reinstated';
     50    const CHARGE_DISPUTE_FUNDS_WITHDRAWN           = 'charge.dispute.funds_withdrawn';
     51    const CHARGE_DISPUTE_UPDATED                   = 'charge.dispute.updated';
     52    const CHARGE_REFUND_UPDATED                    = 'charge.refund.updated';
     53    const COUPON_CREATED                           = 'coupon.created';
     54    const COUPON_DELETED                           = 'coupon.deleted';
     55    const COUPON_UPDATED                           = 'coupon.updated';
     56    const CUSTOMER_CREATED                         = 'customer.created';
     57    const CUSTOMER_DELETED                         = 'customer.deleted';
     58    const CUSTOMER_UPDATED                         = 'customer.updated';
     59    const CUSTOMER_DISCOUNT_CREATED                = 'customer.discount.created';
     60    const CUSTOMER_DISCOUNT_DELETED                = 'customer.discount.deleted';
     61    const CUSTOMER_DISCOUNT_UPDATED                = 'customer.discount.updated';
     62    const CUSTOMER_SOURCE_CREATED                  = 'customer.source.created';
     63    const CUSTOMER_SOURCE_DELETED                  = 'customer.source.deleted';
     64    const CUSTOMER_SOURCE_EXPIRING                 = 'customer.source.expiring';
     65    const CUSTOMER_SOURCE_UPDATED                  = 'customer.source.updated';
     66    const CUSTOMER_SUBSCRIPTION_CREATED            = 'customer.subscription.created';
     67    const CUSTOMER_SUBSCRIPTION_DELETED            = 'customer.subscription.deleted';
     68    const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END     = 'customer.subscription.trial_will_end';
     69    const CUSTOMER_SUBSCRIPTION_UPDATED            = 'customer.subscription.updated';
     70    const FILE_CREATED                             = 'file.created';
     71    const INVOICE_CREATED                          = 'invoice.created';
     72    const INVOICE_DELETED                          = 'invoice.deleted';
     73    const INVOICE_FINALIZED                        = 'invoice.finalized';
     74    const INVOICE_MARKED_UNCOLLECTIBLE             = 'invoice.marked_uncollectible';
     75    const INVOICE_PAYMENT_FAILED                   = 'invoice.payment_failed';
     76    const INVOICE_PAYMENT_SUCCEEDED                = 'invoice.payment_succeeded';
     77    const INVOICE_SENT                             = 'invoice.sent';
     78    const INVOICE_UPCOMING                         = 'invoice.upcoming';
     79    const INVOICE_UPDATED                          = 'invoice.updated';
     80    const INVOICE_VOIDED                           = 'invoice.voided';
     81    const INVOICEITEM_CREATED                      = 'invoiceitem.created';
     82    const INVOICEITEM_DELETED                      = 'invoiceitem.deleted';
     83    const INVOICEITEM_UPDATED                      = 'invoiceitem.updated';
     84    const ISSUER_FRAUD_RECORD_CREATED              = 'issuer_fraud_record.created';
     85    const ISSUING_AUTHORIZATION_CREATED            = 'issuing_authorization.created';
     86    const ISSUING_AUTHORIZATION_UPDATED            = 'issuing_authorization.updated';
     87    const ISSUING_CARD_CREATED                     = 'issuing_card.created';
     88    const ISSUING_CARD_UPDATED                     = 'issuing_card.updated';
     89    const ISSUING_CARDHOLDER_CREATED               = 'issuing_cardholder.created';
     90    const ISSUING_CARDHOLDER_UPDATED               = 'issuing_cardholder.updated';
     91    const ISSUING_TRANSACTION_CREATED              = 'issuing_transaction.created';
     92    const ISSUING_TRANSACTION_UPDATED              = 'issuing_transaction.updated';
     93    const ORDER_CREATED                            = 'order.created';
     94    const ORDER_PAYMENT_FAILED                     = 'order.payment_failed';
     95    const ORDER_PAYMENT_SUCCEEDED                  = 'order.payment_succeeded';
     96    const ORDER_UPDATED                            = 'order.updated';
     97    const ORDER_RETURN_CREATED                     = 'order_return.created';
     98    const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated';
     99    const PAYMENT_INTENT_CREATED                   = 'payment_intent.created';
     100    const PAYMENT_INTENT_FAILED                    = 'payment_intent.failed';
     101    const PAYMENT_INTENT_SUCCEEDED                 = 'payment_intent.succeeded';
     102    const PAYOUT_CANCELED                          = 'payout.canceled';
     103    const PAYOUT_CREATED                           = 'payout.created';
     104    const PAYOUT_FAILED                            = 'payout.failed';
     105    const PAYOUT_PAID                              = 'payout.paid';
     106    const PAYOUT_UPDATED                           = 'payout.updated';
     107    const PING                                     = 'ping';
     108    const PLAN_CREATED                             = 'plan.created';
     109    const PLAN_DELETED                             = 'plan.deleted';
     110    const PLAN_UPDATED                             = 'plan.updated';
     111    const PRODUCT_CREATED                          = 'product.created';
     112    const PRODUCT_DELETED                          = 'product.deleted';
     113    const PRODUCT_UPDATED                          = 'product.updated';
     114    const RECIPIENT_CREATED                        = 'recipient.created';
     115    const RECIPIENT_DELETED                        = 'recipient.deleted';
     116    const RECIPIENT_UPDATED                        = 'recipient.updated';
     117    const REPORTING_REPORT_RUN_FAILED              = 'reporting.report_run.failed';
     118    const REPORTING_REPORT_RUN_SUCCEEDED           = 'reporting.report_run.succeeded';
     119    const REPORTING_REPORT_TYPE_UPDATED            = 'reporting.report_type.updated';
     120    const REVIEW_CLOSED                            = 'review.closed';
     121    const REVIEW_OPENED                            = 'review.opened';
     122    const SIGMA_SCHEDULED_QUERY_RUN_CREATED        = 'sigma.scheduled_query_run.created';
     123    const SKU_CREATED                              = 'sku.created';
     124    const SKU_DELETED                              = 'sku.deleted';
     125    const SKU_UPDATED                              = 'sku.updated';
     126    const SOURCE_CANCELED                          = 'source.canceled';
     127    const SOURCE_CHARGEABLE                        = 'source.chargeable';
     128    const SOURCE_FAILED                            = 'source.failed';
     129    const SOURCE_MANDATE_NOTIFICATION              = 'source.mandate_notification';
     130    const SOURCE_REFUND_ATTRIBUTES_REQUIRED        = 'source.refund_attributes_required';
     131    const SOURCE_TRANSACTION_CREATED               = 'source.transaction.created';
     132    const SOURCE_TRANSACTION_UPDATED               = 'source.transaction.updated';
     133    const SUBSCRIPTION_SCHEDULE_ABORTED            = 'subscription_schedule.aborted';
     134    const SUBSCRIPTION_SCHEDULE_CANCELED           = 'subscription_schedule.canceled';
     135    const SUBSCRIPTION_SCHEDULE_COMPLETED          = 'subscription_schedule.completed';
     136    const SUBSCRIPTION_SCHEDULE_CREATED            = 'subscription_schedule.created';
     137    const SUBSCRIPTION_SCHEDULE_EXPIRING           = 'subscription_schedule.expiring';
     138    const SUBSCRIPTION_SCHEDULE_RELEASED           = 'subscription_schedule.released';
     139    const SUBSCRIPTION_SCHEDULE_UPDATED            = 'subscription_schedule.updated';
     140    const TOPUP_CANCELED                           = 'topup.canceled';
     141    const TOPUP_CREATED                            = 'topup.created';
     142    const TOPUP_FAILED                             = 'topup.failed';
     143    const TOPUP_REVERSED                           = 'topup.reversed';
     144    const TOPUP_SUCCEEDED                          = 'topup.succeeded';
     145    const TRANSFER_CREATED                         = 'transfer.created';
     146    const TRANSFER_REVERSED                        = 'transfer.reversed';
     147    const TRANSFER_UPDATED                         = 'transfer.updated';
    116148
    117149    use ApiOperations\All;
  • stripe/trunk/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php

    r1967366 r2051367  
    4242
    4343    protected $userAgentInfo;
     44
     45    protected $enablePersistentConnections = null;
     46
     47    protected $curlHandle = null;
    4448
    4549    /**
     
    6165        $this->randomGenerator = $randomGenerator ?: new Util\RandomGenerator();
    6266        $this->initUserAgentInfo();
     67
     68        // TODO: curl_reset requires PHP >= 5.5.0. Once we drop support for PHP 5.4, we can simply
     69        // initialize this to true.
     70        $this->enablePersistentConnections = function_exists('curl_reset');
     71    }
     72
     73    public function __destruct()
     74    {
     75        $this->closeCurlHandle();
    6376    }
    6477
     
    8093    {
    8194        return $this->userAgentInfo;
     95    }
     96
     97    /**
     98     * @return boolean
     99     */
     100    public function getEnablePersistentConnections()
     101    {
     102        return $this->enablePersistentConnections;
     103    }
     104
     105    /**
     106     * @param boolean $enable
     107     */
     108    public function setEnablePersistentConnections($enable)
     109    {
     110        $this->enablePersistentConnections = $enable;
    82111    }
    83112
     
    200229        }
    201230
    202         // For HTTPS requests, enable HTTP/2, if supported
    203         $opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2TLS;
     231        if (!isset($opts[CURLOPT_HTTP_VERSION])) {
     232            // For HTTPS requests, enable HTTP/2, if supported
     233            $opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2TLS;
     234        }
    204235
    205236        list($rbody, $rcode) = $this->executeRequestWithRetries($opts, $absUrl);
     
    219250            $errno = 0;
    220251
    221             $curl = curl_init();
    222             curl_setopt_array($curl, $opts);
    223             $rbody = curl_exec($curl);
     252            $this->resetCurlHandle();
     253            curl_setopt_array($this->curlHandle, $opts);
     254            $rbody = curl_exec($this->curlHandle);
    224255
    225256            if ($rbody === false) {
    226                 $errno = curl_errno($curl);
    227                 $message = curl_error($curl);
     257                $errno = curl_errno($this->curlHandle);
     258                $message = curl_error($this->curlHandle);
    228259            } else {
    229                 $rcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    230             }
    231             curl_close($curl);
     260                $rcode = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE);
     261            }
     262            if (!$this->getEnablePersistentConnections()) {
     263                $this->closeCurlHandle();
     264            }
    232265
    233266            if ($this->shouldRetry($errno, $rcode, $numRetries)) {
     
    341374        return $sleepSeconds;
    342375    }
     376
     377    /**
     378     * Initializes the curl handle. If already initialized, the handle is closed first.
     379     */
     380    private function initCurlHandle()
     381    {
     382        $this->closeCurlHandle();
     383        $this->curlHandle = curl_init();
     384    }
     385
     386    /**
     387     * Closes the curl handle if initialized. Do nothing if already closed.
     388     */
     389    private function closeCurlHandle()
     390    {
     391        if (!is_null($this->curlHandle)) {
     392            curl_close($this->curlHandle);
     393            $this->curlHandle = null;
     394        }
     395    }
     396
     397    /**
     398     * Resets the curl handle. If the handle is not already initialized, or if persistent
     399     * connections are disabled, the handle is reinitialized instead.
     400     */
     401    private function resetCurlHandle()
     402    {
     403        if (!is_null($this->curlHandle) && $this->getEnablePersistentConnections()) {
     404            curl_reset($this->curlHandle);
     405        } else {
     406            $this->initCurlHandle();
     407        }
     408    }
    343409}
  • stripe/trunk/vendor/stripe/stripe-php/lib/Invoice.php

    r1967366 r2051367  
    1818 * @property string $billing_reason
    1919 * @property string $charge
    20  * @property bool $closed
     20 * @property int $created
    2121 * @property string $currency
     22 * @property mixed $custom_fields
    2223 * @property string $customer
    23  * @property int $date
     24 * @property string $default_source
    2425 * @property string $description
    2526 * @property Discount $discount
    2627 * @property int $due_date
    2728 * @property int $ending_balance
    28  * @property bool $forgiven
     29 * @property string $footer
    2930 * @property string $hosted_invoice_url
    3031 * @property string $invoice_pdf
     
    4041 * @property int $starting_balance
    4142 * @property string $statement_descriptor
     43 * @property string $status
     44 * @property mixed $status_transitions
    4245 * @property string $subscription
    4346 * @property int $subscription_proration_date
     
    4548 * @property int $tax
    4649 * @property float $tax_percent
     50 * @property mixed $threshold_reason
    4751 * @property int $total
    4852 * @property int $webhooks_delivered_at
     
    5761    use ApiOperations\All;
    5862    use ApiOperations\Create;
     63    use ApiOperations\Delete;
    5964    use ApiOperations\Retrieve;
    6065    use ApiOperations\Update;
     66
     67    /**
     68     * @param array|null $params
     69     * @param array|string|null $opts
     70     *
     71     * @return Invoice The finalized invoice.
     72     */
     73    public function finalizeInvoice($params = null, $opts = null)
     74    {
     75        $url = $this->instanceUrl() . '/finalize';
     76        list($response, $opts) = $this->_request('post', $url, $params, $opts);
     77        $this->refreshFrom($response, $opts);
     78        return $this;
     79    }
     80
     81    /**
     82     * @param array|null $params
     83     * @param array|string|null $opts
     84     *
     85     * @return Invoice The uncollectible invoice.
     86     */
     87    public function markUncollectible($params = null, $opts = null)
     88    {
     89        $url = $this->instanceUrl() . '/mark_uncollectible';
     90        list($response, $opts) = $this->_request('post', $url, $params, $opts);
     91        $this->refreshFrom($response, $opts);
     92        return $this;
     93    }
     94
     95    /**
     96     * @param array|null $params
     97     * @param array|string|null $opts
     98     *
     99     * @return Invoice The paid invoice.
     100     */
     101    public function pay($params = null, $opts = null)
     102    {
     103        $url = $this->instanceUrl() . '/pay';
     104        list($response, $opts) = $this->_request('post', $url, $params, $opts);
     105        $this->refreshFrom($response, $opts);
     106        return $this;
     107    }
     108
     109    /**
     110     * @param array|null $params
     111     * @param array|string|null $opts
     112     *
     113     * @return Invoice The sent invoice.
     114     */
     115    public function sendInvoice($params = null, $opts = null)
     116    {
     117        $url = $this->instanceUrl() . '/send';
     118        list($response, $opts) = $this->_request('post', $url, $params, $opts);
     119        $this->refreshFrom($response, $opts);
     120        return $this;
     121    }
    61122
    62123    /**
     
    76137
    77138    /**
    78      * @return Invoice The paid invoice.
     139     * @param array|null $params
     140     * @param array|string|null $opts
     141     *
     142     * @return Invoice The voided invoice.
    79143     */
    80     public function pay($params = null, $opts = null)
     144    public function voidInvoice($params = null, $opts = null)
    81145    {
    82         $url = $this->instanceUrl() . '/pay';
     146        $url = $this->instanceUrl() . '/void';
    83147        list($response, $opts) = $this->_request('post', $url, $params, $opts);
    84148        $this->refreshFrom($response, $opts);
  • stripe/trunk/vendor/stripe/stripe-php/lib/Issuing/Authorization.php

    r1915991 r2051367  
    2626 * @property mixed $request_history
    2727 * @property string $status
    28  * @property mixed $request_history
    2928 * @property \Stripe\Collection $transactions
    3029 * @property mixed $verification_data
  • stripe/trunk/vendor/stripe/stripe-php/lib/PaymentIntent.php

    r1967366 r2051367  
    88 * @property string $id
    99 * @property string $object
    10  * @property string[] $allowed_source_types
    1110 * @property int $amount
    1211 * @property int $amount_capturable
    1312 * @property int $amount_received
    1413 * @property string $application
    15  * @property int $application_fee
     14 * @property int $application_fee_amount
    1615 * @property int $canceled_at
     16 * @property string $cancellation_reason
    1717 * @property string $capture_method
    1818 * @property Collection $charges
     
    2323 * @property string $customer
    2424 * @property string $description
     25 * @property mixed $last_payment_error
    2526 * @property bool $livemode
    2627 * @property StripeObject $metadata
    27  * @property mixed $next_source_action
     28 * @property mixed $next_action
    2829 * @property string $on_behalf_of
     30 * @property string[] $payment_method_types
    2931 * @property string $receipt_email
    30  * @property string $return_url
    3132 * @property string $review
    3233 * @property mixed $shipping
  • stripe/trunk/vendor/stripe/stripe-php/lib/Person.php

    r1967366 r2051367  
    3636class Person extends ApiResource
    3737{
     38
    3839    const OBJECT_NAME = "person";
    3940
  • stripe/trunk/vendor/stripe/stripe-php/lib/Product.php

    r1915991 r2051367  
    1414 * @property string[] $deactivate_on
    1515 * @property string $description
    16  * @property array $images
     16 * @property string[] $images
    1717 * @property bool $livemode
    1818 * @property StripeObject $metadata
  • stripe/trunk/vendor/stripe/stripe-php/lib/Refund.php

    r1967366 r2051367  
    1313 * @property int $created
    1414 * @property string $currency
     15 * @property string $description
    1516 * @property string $failure_balance_transaction
    1617 * @property string $failure_reason
    1718 * @property StripeObject $metadata
    18  * @property mixed $reason
    19  * @property mixed $receipt_number
     19 * @property string $reason
     20 * @property string $receipt_number
     21 * @property string $source_transfer_reversal
    2022 * @property string $status
     23 * @property string $transfer_reversal
    2124 *
    2225 * @package Stripe
  • stripe/trunk/vendor/stripe/stripe-php/lib/Source.php

    r1967366 r2051367  
    88 * @property string $id
    99 * @property string $object
     10 * @property mixed $ach_credit_transfer
     11 * @property mixed $ach_debit
     12 * @property mixed $alipay
    1013 * @property int $amount
     14 * @property mixed $bancontact
     15 * @property mixed $card
     16 * @property mixed $card_present
    1117 * @property string $client_secret
    1218 * @property mixed $code_verification
    1319 * @property int $created
    1420 * @property string $currency
     21 * @property mixed $eps
    1522 * @property string $flow
     23 * @property mixed $giropay
     24 * @property mixed $ideal
    1625 * @property bool $livemode
    1726 * @property StripeObject $metadata
     27 * @property mixed $multibanco
    1828 * @property mixed $owner
     29 * @property mixed $p24
    1930 * @property mixed $receiver
    2031 * @property mixed $redirect
     32 * @property mixed $sepa_debit
     33 * @property mixed $sofort
    2134 * @property string $statement_descriptor
    2235 * @property string $status
     36 * @property mixed $three_d_secure
    2337 * @property string $type
    2438 * @property string $usage
    25  *
     39 * @property mixed $wechat
     40
    2641 * @package Stripe
    2742 */
  • stripe/trunk/vendor/stripe/stripe-php/lib/Stripe.php

    r1967366 r2051367  
    4747    public static $maxNetworkRetries = 0;
    4848
     49    // @var boolean Whether client telemetry is enabled. Defaults to false.
     50    public static $enableTelemetry = false;
     51
    4952    // @var float Maximum delay between retries, in seconds
    5053    private static $maxNetworkRetryDelay = 2.0;
     
    5356    private static $initialNetworkRetryDelay = 0.5;
    5457
    55     const VERSION = '6.20.0';
     58    const VERSION = '6.30.4';
    5659
    5760    /**
     
    240243        return self::$initialNetworkRetryDelay;
    241244    }
     245
     246    /**
     247     * @return bool Whether client telemetry is enabled
     248     */
     249    public static function getEnableTelemetry()
     250    {
     251        return self::$enableTelemetry;
     252    }
     253
     254    /**
     255     * @param bool $enableTelemetry Enables client telemetry.
     256     *
     257     * Client telemetry enables timing and request metrics to be sent back to Stripe as an HTTP Header
     258     * with the current request. This enables Stripe to do latency and metrics analysis without adding extra
     259     * overhead (such as extra network calls) on the client.
     260     */
     261    public static function setEnableTelemetry($enableTelemetry)
     262    {
     263        self::$enableTelemetry = $enableTelemetry;
     264    }
    242265}
  • stripe/trunk/vendor/stripe/stripe-php/lib/Subscription.php

    r1967366 r2051367  
    1111 * @property string $billing
    1212 * @property int $billing_cycle_anchor
     13 * @property mixed $billing_thresholds
    1314 * @property bool $cancel_at_period_end
    1415 * @property int $canceled_at
     
    1819 * @property string $customer
    1920 * @property int $days_until_due
     21 * @property string $default_source
    2022 * @property Discount $discount
    2123 * @property int $ended_at
    2224 * @property Collection $items
     25 * @property string $latest_invoice
    2326 * @property boolean $livemode
    2427 * @property StripeObject $metadata
    2528 * @property Plan $plan
    2629 * @property int $quantity
     30 * @property SubscriptionSchedule $schedule
    2731 * @property int $start
    2832 * @property string $status
  • stripe/trunk/vendor/stripe/stripe-php/lib/SubscriptionItem.php

    r1967366 r2051367  
    88 * @property string $id
    99 * @property string $object
     10 * @property mixed $billing_thresholds
    1011 * @property int $created
    1112 * @property StripeObject $metadata
  • stripe/trunk/vendor/stripe/stripe-php/lib/Transfer.php

    r1915991 r2051367  
    6262
    6363    /**
    64      * @param array|null $id The ID of the transfer on which to create the reversal.
     64     * @param string|null $id The ID of the transfer on which to create the reversal.
    6565     * @param array|null $params
    6666     * @param array|string|null $opts
     
    7474
    7575    /**
    76      * @param array|null $id The ID of the transfer to which the reversal belongs.
     76     * @param string|null $id The ID of the transfer to which the reversal belongs.
    7777     * @param array|null $reversalId The ID of the reversal to retrieve.
    7878     * @param array|null $params
     
    8787
    8888    /**
    89      * @param array|null $id The ID of the transfer to which the reversal belongs.
     89     * @param string|null $id The ID of the transfer to which the reversal belongs.
    9090     * @param array|null $reversalId The ID of the reversal to update.
    9191     * @param array|null $params
     
    100100
    101101    /**
    102      * @param array|null $id The ID of the transfer on which to retrieve the reversals.
     102     * @param string|null $id The ID of the transfer on which to retrieve the reversals.
    103103     * @param array|null $params
    104104     * @param array|string|null $opts
  • stripe/trunk/vendor/stripe/stripe-php/lib/TransferReversal.php

    r1915991 r2051367  
    1212 * @property int $created
    1313 * @property string $currency
     14 * @property string $destination_payment_refund
    1415 * @property StripeObject $metadata
     16 * @property string $source_refund
    1517 * @property string $transfer
    1618 *
  • stripe/trunk/vendor/stripe/stripe-php/lib/Util/Util.php

    r1967366 r2051367  
    7272            // business objects
    7373            \Stripe\Account::OBJECT_NAME => 'Stripe\\Account',
     74            \Stripe\AccountLink::OBJECT_NAME => 'Stripe\\AccountLink',
    7475            \Stripe\AlipayAccount::OBJECT_NAME => 'Stripe\\AlipayAccount',
    7576            \Stripe\ApplePayDomain::OBJECT_NAME => 'Stripe\\ApplePayDomain',
     
    8283            \Stripe\Card::OBJECT_NAME => 'Stripe\\Card',
    8384            \Stripe\Charge::OBJECT_NAME => 'Stripe\\Charge',
     85            \Stripe\Checkout\Session::OBJECT_NAME => 'Stripe\\Checkout\\Session',
    8486            \Stripe\CountrySpec::OBJECT_NAME => 'Stripe\\CountrySpec',
    8587            \Stripe\Coupon::OBJECT_NAME => 'Stripe\\Coupon',
     
    113115            \Stripe\Plan::OBJECT_NAME => 'Stripe\\Plan',
    114116            \Stripe\Product::OBJECT_NAME => 'Stripe\\Product',
     117            \Stripe\Radar\ValueList::OBJECT_NAME => 'Stripe\\Radar\\ValueList',
     118            \Stripe\Radar\ValueListItem::OBJECT_NAME => 'Stripe\\Radar\\ValueListItem',
    115119            \Stripe\Recipient::OBJECT_NAME => 'Stripe\\Recipient',
    116120            \Stripe\RecipientTransfer::OBJECT_NAME => 'Stripe\\RecipientTransfer',
     
    118122            \Stripe\Reporting\ReportRun::OBJECT_NAME => 'Stripe\\Reporting\\ReportRun',
    119123            \Stripe\Reporting\ReportType::OBJECT_NAME => 'Stripe\\Reporting\\ReportType',
     124            \Stripe\Review::OBJECT_NAME => 'Stripe\\Review',
    120125            \Stripe\SKU::OBJECT_NAME => 'Stripe\\SKU',
    121126            \Stripe\Sigma\ScheduledQueryRun::OBJECT_NAME => 'Stripe\\Sigma\\ScheduledQueryRun',
     
    124129            \Stripe\Subscription::OBJECT_NAME => 'Stripe\\Subscription',
    125130            \Stripe\SubscriptionItem::OBJECT_NAME => 'Stripe\\SubscriptionItem',
     131            \Stripe\SubscriptionSchedule::OBJECT_NAME => 'Stripe\\SubscriptionSchedule',
     132            \Stripe\SubscriptionScheduleRevision::OBJECT_NAME => 'Stripe\\SubscriptionScheduleRevision',
    126133            \Stripe\ThreeDSecure::OBJECT_NAME => 'Stripe\\ThreeDSecure',
    127134            \Stripe\Terminal\ConnectionToken::OBJECT_NAME => 'Stripe\\Terminal\\ConnectionToken',
     
    334341        return [$id, $params];
    335342    }
     343
     344    /**
     345     * Returns UNIX timestamp in milliseconds
     346     *
     347     * @return integer current time in millis
     348     */
     349    public static function currentTimeMillis()
     350    {
     351        return (int) round(microtime(true) * 1000);
     352    }
    336353}
Note: See TracChangeset for help on using the changeset viewer.