Получил Http код ответа 400 при доступе к https://api.sandbox.paypal.com/v1/payments/billing-agreements/EC-39X33455C9740382Y/agreement-execute - PullRequest
0 голосов
/ 30 января 2019

Я получаю ошибку Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/billing-agreements/EC-39X33455C9740382Y/agreement-execute.при попытке выполнить соглашение после успешной генерации токена

    $agreement = new Agreement();
    try {       
        $agreement->execute($token, $this->apiContext);
     } catch (PayPal\Exception\PayPalConnectionException $ex) {
        echo $ex->getCode(); // Prints the Error Code
        echo $ex->getData(); // Prints the detailed error message 
        die($ex);
    } catch (Exception $ex) {
        die($ex);
    }

В списке некоторых причин отображается пустой тарифный план.Это удаление плана после активации

Вот детали плана

{"id": "P-57S41478JH7776830TYYBQBI", "state": "ACTIVE", "name": "T-План клуба "Футболка месяца" "," описание ":" Создание шаблона "," тип ":" ИСПРАВЛЕНО "," payment_definitions ": [{" id ":" PD-9DS62581BA030814YTYYBQBI "," name ":" Regular Payments ", "тип": "РЕГУЛЯРНЫЙ", "частота": "Месяц", "сумма": {"валюта": "INR", "значение": "100"}, "циклы": "12", "charge_models": [{"id": "CHM-99X46919U8328850ETYYBQBI", "type": "SHIPPING", "amount": {"currency": "INR", "value": "10"}}], "interval_interval": "2 "}]," merchant_preferences ": {" setup_fee ": {" currency ":" INR "," value ":" 1 "}," max_fail_attempts ":" 0 "," return_url ":" http://forext.dev/execute-agreement/true", "cancel_url": "http://forext.dev/execute-agreement/false"," auto_bill_amount ":" YES "," initial_fail_amount_action ":" CONTINUE "}," create_time ":" 2019-01-30T09: 56: 18.565Z "," update_time ":"2019-01-30T09: 57: 14.260Z", "links": [{"href": "https://api.sandbox.paypal.com/v1/payments/billing-plans/P-57S41478JH7776830TYYBQBI"," rel ":" self "," method ":" GET "}]}} 1015*

...