質問編集履歴
5
誤字の修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Stripeでdata-amountパラ
|
1
|
+
Stripeでdata-amountパラメータを受け取れない
|
test
CHANGED
File without changes
|
4
情報の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -264,6 +264,8 @@
|
|
264
264
|
|
265
265
|
https://stackoverflow.com/questions/39487550/stripe-checkout-charge-passing-amount
|
266
266
|
|
267
|
+
https://stackoverflow.com/questions/37854933/stripe-dynamically-set-amount-returns-null-when-called-on-charge-php
|
268
|
+
|
267
269
|
を見ると、
|
268
270
|
|
269
271
|
https://stripe.com/docs/checkout
|
3
実験情報の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -230,6 +230,8 @@
|
|
230
230
|
|
231
231
|
|
232
232
|
|
233
|
+
---
|
234
|
+
|
233
235
|
http://d.hatena.ne.jp/kitokitoki/20080819/1219074548
|
234
236
|
|
235
237
|
こちらのサイトの入れ知恵で、
|
@@ -254,6 +256,36 @@
|
|
254
256
|
|
255
257
|
|
256
258
|
|
259
|
+
---
|
260
|
+
|
261
|
+
英語なのでかなり浅い理解なのですが、海外のサイト⇓
|
262
|
+
|
263
|
+
https://gist.github.com/siddarth/1379771
|
264
|
+
|
265
|
+
https://stackoverflow.com/questions/39487550/stripe-checkout-charge-passing-amount
|
266
|
+
|
267
|
+
を見ると、
|
268
|
+
|
269
|
+
https://stripe.com/docs/checkout
|
270
|
+
|
271
|
+
にある
|
272
|
+
|
273
|
+
$amount = $_POST['data-amount'];
|
274
|
+
|
275
|
+
ではなく、
|
276
|
+
|
277
|
+
$amount = $_POST['amount'];
|
278
|
+
|
279
|
+
でしたのでこれでもやってみましたが結果は変わらずNULLでした。
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
既定の情報
|
286
|
+
|
287
|
+
---
|
288
|
+
|
257
289
|
Stripeのライブラリは6.4.1 です。
|
258
290
|
|
259
291
|
|
2
実験情報の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -230,7 +230,27 @@
|
|
230
230
|
|
231
231
|
|
232
232
|
|
233
|
-
|
233
|
+
http://d.hatena.ne.jp/kitokitoki/20080819/1219074548
|
234
|
+
|
235
|
+
こちらのサイトの入れ知恵で、
|
236
|
+
|
237
|
+
```PHP
|
238
|
+
|
239
|
+
foreach($_POST as $idx => $val){echo "$idx = $val<br>";}
|
240
|
+
|
241
|
+
```
|
242
|
+
|
243
|
+
これを使うとPOSTでとれるデータが全てとれるみたいなんですが、
|
244
|
+
|
245
|
+
これを使ってみると
|
246
|
+
|
247
|
+
stripeToken
|
248
|
+
|
249
|
+
stripeTokenType
|
250
|
+
|
251
|
+
stripeEmail
|
252
|
+
|
253
|
+
の3つしか受け取っていませんでした。なぜでしょうか…
|
234
254
|
|
235
255
|
|
236
256
|
|
1
情報の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -96,7 +96,7 @@
|
|
96
96
|
|
97
97
|
// See your keys here: https://dashboard.stripe.com/account/apikeys
|
98
98
|
|
99
|
-
\Stripe\Stripe::setApiKey("sk_test_
|
99
|
+
\Stripe\Stripe::setApiKey("sk_test_hogehogehogehogehoge");
|
100
100
|
|
101
101
|
|
102
102
|
|
@@ -180,7 +180,7 @@
|
|
180
180
|
|
181
181
|
// See your keys here: https://dashboard.stripe.com/account/apikeys
|
182
182
|
|
183
|
-
\Stripe\Stripe::setApiKey("sk_test_
|
183
|
+
\Stripe\Stripe::setApiKey("sk_test_hogehogehogehoge");
|
184
184
|
|
185
185
|
|
186
186
|
|