現時点では、お客さまの要求を処理することができません。もう一度お試しください。

I create a payment link with the following source.

In the sound box the payment can be proceeded.

but in the production It has the error [現時点では、お客さまの要求を処理することができません。もう一度お試しください。].

I use different card but the error is same.

please give me the solution

 

 

$recurring_price_money = new \Square\Models\Money();
$recurring_price_money->setAmount($value['price']);
$recurring_price_money->setCurrency('JPY');
$subscription_phase = new \Square\Models\SubscriptionPhase('MONTHLY');
$subscription_phase->setRecurringPriceMoney($recurring_price_money);
$phases = [$subscription_phase];
$subscription_plan_data = new \Square\Models\CatalogSubscriptionPlan($value['name'] . ":" . "¥" . $value['price'] . "/" . "Month");
$subscription_plan_data->setPhases($phases);
$object = new \Square\Models\CatalogObject('SUBSCRIPTION_PLAN', '#'.$value['stripe_price_id']);
$object->setSubscriptionPlanData($subscription_plan_data);
$body = new \Square\Models\UpsertCatalogObjectRequest(uniqid(), $object);
$api_response = $client->getCatalogApi()->upsertCatalogObject($body);
if ($api_response->isSuccess()) {
$result = $api_response->getResult();
$subscription_plan_id = $result->getCatalogObject()->getId();
} else {
$errors = $api_response->getErrors();
var_dump($errors);
}

 

$price_money = new \Square\Models\Money();
$price_money->setAmount($value['price']);
$price_money->setCurrency('JPY');
$quick_pay_name = $value['name'] . ":" . "¥" . $value['price'] . "/" . "Month";
$quick_pay = new \Square\Models\QuickPay(
$quick_pay_name,
$price_money,
SQUARE_PRODUCTION_LOCATION_ID
);
$checkout_options = new \Square\Models\CheckoutOptions();
$checkout_options->setSubscriptionPlanId($subscription_plan_id);
$body = new \Square\Models\CreatePaymentLinkRequest();
$body->setIdempotencyKey(uniqid().'-CHECKOUT-'.$value['level'].'-'.$_COOKIE[USER_COKKIE_VALUNE_ID]);
$body->setQuickPay($quick_pay);
$body->setCheckoutOptions($checkout_options);
$api_response = $client->getCheckoutApi()->createPaymentLink($body);
if ($api_response->isSuccess()) {
$result = $api_response->getResult();
//header("HTTP/1.1 303 See Other");
header("Location: " . $result->getPaymentLink()->getUrl());
} else {
$errors = $api_response->getErrors();
var_dump($errors);
}

  • API
432件の閲覧回数
メッセージ1/2
不適切なコンテンツを報告
1 解決策
Square Community Moderator

解決策

Hi @wengjunxiao , thank you for reaching out!

 

For the question with the detailed codes, we recommend to post ask in  Square Developer Forum or contact to the developer support for the better solution. Thank you!

 

Developer resources

間宮 −Mamiya
Square コミュニティ管理者
解決策や有用な回答には、ログイン して ベストアンサーとしてマークをクリックしましょう!

解決策を見る >

377件の閲覧回数
メッセージ2/2
不適切なコンテンツを報告
1 返信
Square Community Moderator

解決策

Hi @wengjunxiao , thank you for reaching out!

 

For the question with the detailed codes, we recommend to post ask in  Square Developer Forum or contact to the developer support for the better solution. Thank you!

 

Developer resources

間宮 −Mamiya
Square コミュニティ管理者
解決策や有用な回答には、ログイン して ベストアンサーとしてマークをクリックしましょう!
378件の閲覧回数
メッセージ2/2
不適切なコンテンツを報告