Error 500
Bluewinters
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jul-03-2018
02:30 PM
Getting an error while attempting to create a billing plan: "Got Http response code 500 when accessing https://api.paypal.com/v1/payments/billing-plans/.'" Happening on both sandbox and live. Debug ID: 1e68b5b685bae Code (PHP SDK): $plan = new Plan(); $plan->setName('<SubscriptionName>') ->setDescription('<SubscriptionDescription>') ->setType('infinite'); $paymentDefinition = new PaymentDefinition(); $paymentDefinition->setName('Regular Payments') ->setType('REGULAR') ->setFrequency('Month') ->setFrequencyInterval("1") ->setCycles("0") ->setAmount(new Currency(array('value' => 14.99, 'currency' => 'USD'))); $paymentDefinition->setChargeModels(array(null)); $merchantPreferences = new MerchantPreferences(); $baseUrl = "<url>"; $merchantPreferences->setReturnUrl("$baseUrl/ExecuteAgreement.php?success=true") ->setCancelUrl("$baseUrl/ExecuteAgreement.php?success=false") ->setAutoBillAmount("yes") ->setInitialFailAmountAction("CONTINUE") ->setMaxFailAttempts("2") ->setSetupFee(new Currency(array('value' => 0, 'currency' => 'USD'))); $plan->setPaymentDefinitions(array($paymentDefinition)); $plan->setMerchantPreferences($merchantPreferences); $request = clone $plan; $output; try { $output = $plan->create($apiContext); } catch (Exception $ex) { echo 'Error: '.$ex.'.'; die; }
1 REPLY 1
Bluewinters
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul-04-2018
01:55 AM
Update,
Just before anyone asks yes we are within the latest version of TLS 1.2 as well as HTTPS 1.1
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Our online donation forms won't connect to Paypal in PayPal Payments Standard
- Error entering beneficial ownership information - as part of WPForms settings in Payflow
- I need help with Sandbox Testing for my website in PayPal Payments Standard
- Something doesn't look right. Your payment to this merchant can't be completed using PayPal. in Sandbox Environment
- Using Paypal Smart Buttons for checkout sometimes fails with Debit/ Credit Cards Form in Braintree Client-side Integration (JS, iOS, Android SDKs)