I'm following this guide for implementing the PayPal REST API in my Rails app, and it gives an error that's said in the title, specifically pointing to this line in the code under create_order
.
response = @client.execute request
I'm sure I have my client id and secret copy pasted and I also copy pasted most of the code to avoid any errors. What's causing this problem and how do I fix it? I appreciate the help.
Edit:
Command line output:
Started POST "/create_order" for ::1 at 2021-11-16 21:21:07 +0800
Processing by BookingsController#create_order as */*
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms | Allocations: 1603)
NoMethodError (undefined method `escape' for URI:Module):
app/controllers/bookings_controller.rb:35:in `create_order'