Skip to content

Instantly share code, notes, and snippets.

@sandabu
sandabu / Example.php
Last active February 7, 2022 12:14
Stripe API Japanese Error Messages
<?php
//Composerでstripe/stripe-php をrequire済み
require_once __FILE__. './jp.php';
try{
Stripe\Stripe::setApiKey('sk_test_YOUR_KEY');
Stripe\Charge::create([]);
}catch(Stripe\Error\Base $e) {
$err = $e->getJsonBody()['error'];
if(key_exists('code', $err)) {
git rm --cached `git ls-files --full-name -i --exclude-from=.gitignore`
Argument list too longと怒られる
git ls-files --full-name -i --exclude-from=.gitignore | xargs git rm --cached