From 8bdd3308a4226fddde7e23804c4e2440a084d6f8 Mon Sep 17 00:00:00 2001 From: mlantz Date: Thu, 2 Mar 2017 22:28:25 -0500 Subject: [PATCH] PCI fixes --- src/Publishes/app/Controllers/CardController.php | 1 + src/Publishes/public/js/purchases.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/Publishes/app/Controllers/CardController.php b/src/Publishes/app/Controllers/CardController.php index ca9f6bf..61825d1 100644 --- a/src/Publishes/app/Controllers/CardController.php +++ b/src/Publishes/app/Controllers/CardController.php @@ -47,6 +47,7 @@ public function changeCard() public function setCard(Request $request) { $user = auth()->user(); + if (is_null($user->meta->stripe_id) && $request->input('stripeToken')) { $user->meta->createAsStripeCustomer($request->input('stripeToken')); } elseif ($request->input('stripeToken')) { diff --git a/src/Publishes/public/js/purchases.js b/src/Publishes/public/js/purchases.js index 6986a8f..73c3732 100644 --- a/src/Publishes/public/js/purchases.js +++ b/src/Publishes/public/js/purchases.js @@ -7,6 +7,12 @@ $(function(){ name: 'Arya Stark', expiry: '**/****', cvc: '***' + }, + formSelectors: { /* Defaults use name= attributes, not available per PCI compliance */ + numberInput: 'input#number', + expiryInput: 'input#expiry', + cvcInput: 'input#cvc', + nameInput: 'input#name' } });