스트라이프가 훌륭하게 작동합니다. Stripe이 이메일을 인식하고 "인증 코드 입력"을 제외하고 고객의 기부로 새로운 구독이 만들어지고 효과가 있습니다.스트라이프 체크 아웃 - 인식 된 스트라이프 사용자의 구독 문제
고객이 그렇게하는 경우, 어떤 이유로 새로운 구독이 생성되지 않고 고객에게 요금이 부과되지 않습니다. 여기
내 전하 monthly.php<?php
require_once('init.php');
// Set your secret key: remember to change this to your live secret key in production
// See your keys here https://dashboard.stripe.com/account/apikeys
\Stripe\Stripe::setApiKey("sk_test_**************");
// Get the credit card details submitted by the form
$token = $_POST['stripeToken'];
$email = $_POST['stripeEmail'];
$amount = $_POST['amount'];
$finalamount = $amount * 100;
$dollars = ".00";
$plan = "/month";
$dash = " - ";
$monthlyplan = $amount .$dollars .$plan .$dash .$email;
//Create monthly plan
$plan = \Stripe\Plan::create(array(
"name" => $monthlyplan,
"id" => $monthlyplan,
"interval" => "month",
"currency" => "usd",
"amount" => $finalamount,
));
// Create a Customer
$customer = \Stripe\Customer::create(array(
"source" => $token,
"description" => "MONTHLY DONATION",
"plan" => $monthlyplan,
"email" => $email,)
);
?>
스트라이프가 사용자를 인식하고 그는 "로그인"할 때 그것은 나를 구독을 만들 수 없습니다 왜 어떤 아이디어인가? 아 ...
{
"error": {
"type": "invalid_request_error",
"message": "Plan already exists."
}
}
그러나 확실히 만들 계획이되지 않습니다 : 스트라이핑 로그에서
는,이 400 오류가 발생합니다!
나는 무슨 일이 일어나고 있는지 잘 모르겠다. Subscription 작성 문제에 직면했다고하셨습니다. 그러나 제공된 코드는 계획 및 고객을 작성하는 데 사용됩니다. 그리고 오류 메시지는 계획의 ID가 메시지 당 기존 계획과 일치하지만 "계획이 이미 있습니다"라고 말했습니다! – Zico