Skip to content

Commit

Permalink
Add class for styling the "input"; fix bug with elementsArgs variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanpatten committed Oct 4, 2017
1 parent e3c2175 commit c2f8ddd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions class-rcp-payment-gateway-stripe-elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function fields() {
'style' => array(
'base' => array(
'fontFamily' => 'Arial, sans-serif',
'fontSize' => '15px',
'fontSize' => '16px',
'color' => 'black',
),
'invalid' => array(
Expand All @@ -42,7 +42,7 @@ public function fields() {

<div class="form-row">
<label for="card-element"><?php _e( 'Credit or debit card', 'rcp' ); ?></label>
<div id="card-element"></div>
<div id="card-element" class="rcp-stripe-elements-input"></div>
<div id="card-errors" role="alert"></div>
</div>
<br>
Expand All @@ -56,7 +56,7 @@ public function fields() {
elementsArgs = <?php echo json_encode( $data ); ?>;

// Create and mount the card
card = elements.create( 'card', <?php echo json_decode( $data ); ?> );
card = elements.create( 'card', elementsArgs );
card.mount( '#card-element' );

// Listen for errors during type in Stripe Elements
Expand Down Expand Up @@ -146,4 +146,4 @@ public function scripts() {
* @return void
*/
public function validate_fields() {}
}
}

0 comments on commit c2f8ddd

Please sign in to comment.