前提・実現したいこと
stripe payment linksでメールアドレスを再利用したい。
stripe payment links(test mode)とweb hooksを組み合わせてサンクスメールを送りたいと思い作成していたのですが、メールアドレスの取得がうまくいかないため質問させていただきました。(phpで作成)
発生している問題・エラーメッセージ
エンドポイントへのリクエスト { "id": "evt_1JIa2SGU7ZsU0u3YLMWOtWuF", "object": "event", "api_version": "2020-08-27", "created": 1627568202, "data": { "object": { "id": "pi_1JIa2PGU7ZsU0u3YzeelbxNX", "object": "payment_intent", "amount": 1000000, "amount_capturable": 0, "amount_received": 1000000, "application": null, "application_fee_amount": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "charges": { "object": "list", "data": [ { "id": "ch_1JIa2PGU7ZsU0u3Ygh3WojNd", "object": "charge", "amount": 1000000, "amount_captured": 1000000, "amount_refunded": 0, "application": null, "application_fee": null, "application_fee_amount": null, "balance_transaction": "txn_1JIa2QGU7ZsU0u3YlsTOyDlB", "billing_details": { "address": { "city": null, "country": "JP", "line1": null, "line2": null, "postal_code": null, "state": null }, "email": "g122p938rh@gmail.com", "name": "test", "phone": null }, "calculated_statement_descriptor": "WWW.SAKAKENBLOG.NET", "captured": true, "created": 1627568201, "currency": "jpy", "customer": "cus_JwSyGgIL9Where", "description": "Subscription creation", "destination": null, "dispute": null, "disputed": false, "failure_code": null, "failure_message": null, "fraud_details": { }, "invoice": "in_1JIa2PGU7ZsU0u3Y9iHzEeLH", "livemode": false, "metadata": { }, "on_behalf_of": null, "order": null, "outcome": { "network_status": "approved_by_network", "reason": null, "risk_level": "normal", "risk_score": 55, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, "payment_intent": "pi_1JIa2PGU7ZsU0u3YzeelbxNX", "payment_method": "pm_1JIa2OGU7ZsU0u3Y2EwFtV4L", "payment_method_details": { "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "pass" }, "country": "US", "exp_month": 2, "exp_year": 2022, "fingerprint": "si1uii0mKt6jC17U", "funding": "credit", "installments": null, "last4": "4242", "network": "visa", "three_d_secure": null, "wallet": null }, "type": "card" }, "receipt_email": null, "receipt_number": null, "receipt_url": "https://pay.stripe.com/receipts/acct_1J9lj4GU7ZsU0u3Y/ch_1JIa2PGU7ZsU0u3Ygh3WojNd/rcpt_JwSyrZ7rUyHdItkjpKoaDVLutSZzhVH", "refunded": false, "refunds": { "object": "list", "data": [ ], "has_more": false, "total_count": 0, "url": "/v1/charges/ch_1JIa2PGU7ZsU0u3Ygh3WojNd/refunds" }, "review": null, "shipping": null, "source": null, "source_transfer": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null } ], "has_more": false, "total_count": 1, "url": "/v1/charges?payment_intent=pi_1JIa2PGU7ZsU0u3YzeelbxNX" }, "client_secret": "pi_1JIa2PGU7ZsU0u3YzeelbxNX_secret_dHEFUO1w22Y0tc6pRFqsJkRU6", "confirmation_method": "automatic", "created": 1627568201, "currency": "jpy", "customer": "cus_JwSyGgIL9Where", "description": "Subscription creation", "invoice": "in_1JIa2PGU7ZsU0u3Y9iHzEeLH", "last_payment_error": null, "livemode": false, "metadata": { }, "next_action": null, "on_behalf_of": null, "payment_method": "pm_1JIa2OGU7ZsU0u3Y2EwFtV4L", "payment_method_options": { "card": { "installments": null, "network": null, "request_three_d_secure": "automatic" } }, "payment_method_types": [ "card" ], "receipt_email": null, "review": null, "setup_future_usage": "off_session", "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null } }, "livemode": false, "pending_webhooks": 1, "request": { "id": "req_2EYtPpHftZAocb", "idempotency_key": null }, "type": "payment_intent.succeeded" }
該当のソースコード
$email = $data->receipt_email;
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
あなたの回答
tips
プレビュー