How to test credit card recurring payment via REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I want to apply a business account for my online shop. I use the REST API to build the payment gateway in my website. I want to accept credit card when client subscribes my monthly service.
Now I tested the API implementation using a sandbox business account and a sandbox business pro account and none of them can accept the credit card subscriptions.
Do I need to do some special settings to get it working?
This is the API document I followed.
https://developer.paypal.com/docs/api/overview/
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the error I got:
PayPal Create Recurring Payment Exception: <br />Error Message: Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/billing-agreements/.<br />Line Number: 202<br />Trace:
#0 /.../app/Vendor/paypal/rest-api-sdk-php/lib/PayPal/Transport/PayPalRestCall.php(78): PayPal\Core\PayPalHttpConnection->execute('{"name":"Email ...')
#1 /.../app/Vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalResourceModel.php(104): PayPal\Transport\PayPalRestCall->execute(Array, '/v1/payments/bi...', 'POST', '{"name":"Email ...', NULL)
#2 /.../app/Vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Agreement.php(390): PayPal\Common\PayPalResourceModel::executeCall('/v1/payments/bi...', 'POST', '{"name":"Email ...', NULL, Object(PayPal\Rest\ApiContext), NULL)
#3 /.../app/Plugin/Payment/Controller/PaymentPayPalGatewayController.php(900): PayPal\Api\Agreement->create(Object(PayPal\Rest\ApiContext))
#4 [internal function]: PaymentPayPalGatewayController->admin_recurringPayment('479', '1')
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- recurring payments when price maybe changed and price have 2 decimal point in REST APIs
- Need help to integrate Advanced Checkout (PPCP) With WHMCS in PayPal Upgrade Community
- I need to integrate a recurring payment with a variable for a pay-as-you-go product in REST APIs
- Mandatory Account Creation Hindering Customer Experience in REST APIs
- “This payment cannot be processed because there was an error with the capture order API call”. in REST APIs