This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button { | |
border: 0; | |
font-weight: 500; | |
} | |
fieldset { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react'; | |
import './App.css'; | |
import Square from './Component/Square'; | |
const App = () => { | |
const [isLoad, setLoad] = useState(false); | |
useEffect(() => { | |
let sqPaymentScript = document.createElement("script"); | |
// sandbox: https://js.squareupsandbox.com/v2/paymentform | |
// production: https://js.squareup.com/v2/paymentform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REACT_APP_APLLICATION_ID=Application Id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx create-react-app client | |
cd client | |
npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('config.php'); | |
$request = 'USER='.$USER; | |
$request .= '&VENDOR='.$VENDOR ; | |
$request .= '&PARTNER='.$PARTNER; | |
$request .= '&PWD='.$PWD; | |
$request .= '&TENDER=C'; | |
$request .= '&TRXTYPE=S' ; // S => sale transaction | |
$request .= '&AMT=40'; | |
$request .= '&CURRENCY=USD'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('config.php'); | |
$request = 'USER='.$USER; | |
$request .= '&VENDOR='.$VENDOR ; | |
$request .= '&PARTNER='.$PARTNER; | |
$request .= '&PWD='.$PWD; | |
$request .= '&TENDER=C'; | |
$request .= '&TRXTYPE=D' ; // D => delay capture | |
$request .= '&AMT=60'; | |
$request .= '&CURRENCY=USD'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php artisan serve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\API; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\API\ResponseController as ResponseController; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Auth; | |
use App\User; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\API; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller as Controller; | |
use Illuminate\Support\Facades\Auth; | |
use App\User; |