Problem with PayPal checkout and Braintree class - paypal

I am trying to set up a PayPal checkout with this tutorial:
https://developer.paypal.com/docs/checkout/integrate/#
I am facing a problem with step 6. Verify the transaction
The php script throws:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /vendor/braintree/braintreehttp/lib/BraintreeHttp/HttpClient.php on line 38
in the Browser console.
function __construct(Environment $environment)
{
$this->environment = $environment;
$this->encoder = new Encoder();
$this->curlCls = Curl::class;
}
The last line is 38. Anybody an idea what is going wrong here?

I had the same error and commented out line that sets curlCls
$this->curlCls = Curl::class;
It looks it is not used anywhere and the basic PayPal example started to work.

Related

Obscure fastlane runtime fails. syntax error, unexpected end-of-input, expecting `end'

My Fastfile lane looked good, but the interpreter reports that it is expecting a matching 'end' (as in do-end pairing).
desc "Test the token passing from Jenkins."
lane :cliToken do |options|
token = options[:firebase_cli_token]
puts "(fastlane) ** Firebase CLI token: #{token}"
firebase_app_distribution( app:"1:XXXXXXXXXXXX:android:ZZZZZZZZZZZZZZZZ",
groups:options[:test_group],
firebase_cli_token:#{token})
end
The solution was to put the last substitution argument in quotes.
firebase_cli_token:"#{token}")
the complete lane-code is:
desc "Test the token passing from Jenkins."
lane :cliToken do |options|
token = options[:firebase_cli_token]
puts "(fastlane) ** Firebase CLI token: #{token}"
firebase_app_distribution( app:"1:XXXXXXXXXXXX:android:ZZZZZZZZZZZZZZZZ",
groups:options[:test_group],
firebase_cli_token:"#{token}")
end
This may be obvious to others, but I lost several hours of head scratching and I did not find anyone with the same solution (although very similar error message).

Swift not allowing if statement because it dose not recognize an variable that is defined in the if statement

I am trying to get the input of a text field so that if the user is the one that is allowed in then their user credentials can be matched to a folder that is in the cloud but swift is giving the error "expected declaration" but there is no variable that is undefined. if anyone can help me then that would be greatly appreciated.
fist section of code second section of code
It's giving you the expected declaration error in your first screenshot because your if statement is not in the body of a function. You have to put your if statement in the body of a function.
func checkUserCredentials(){
if username_Input.text == "tyler" && password == ("1234"){
//do something
}
}

Dialogflow prebuilt agent's Make Appointment intent seems to be buggy on initial deployment

First, when you follow the tutorial here and deploy the recommended prebuilt agent, and you view the Inline Editor under fulfillment, the editor displays a warning/error on line 82:
expected an assignment or function call and instead saw an expression.
code snippet throwing up the error:
err ? reject(err) : resolve(event);
Having set up the Google Calender API and updated the parameter in index.js file, the prebuilt agent returns this error below when "Make Appointment intent" is run. the appointmentDateString constant can not read and parse the time parameter correctly.
Sorry, we're booked on Invalid Date at Invalid Date. Is there anything else I can do for you?
The problem is that the date format is not correct beacause there are two timeZoneOffset in the string to parse to Date.
In order to solve this issue, erase one of the timeoffset.
function convertParametersDate(date, time){
//ORIGINAL
//return new Date(Date.parse(date.split('T')[0] + 'T' + time.split('T')[1].split('-')[0] **+ timeZoneOffset**));
//SOLVED
return new Date(Date.parse(date.split('T')[0] + 'T' + time.split('T')[1].split('-')[0]));
}

JasperReports: report parameter as an argument for message bundle lookup

How to look up a particular internationalized property based on a report parameter?
This works, but is static:
$R{some_literal_string}
This works too, but is not internationalized:
$P{key_to_parameters_map_element}
What I need is:
$R{$P{key_to_parameters_map_element}}
Unfortunately, I get a pile of error messages:
Caused by: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. Syntax error on token "}", delete this token
value = str("$P{key_to_parameters_map_element")}; //$JR_EXPR_ID=13$
This doesn't change anything:
$R{$P{key_to_parameters_map_element}.toString()}
Is this possible at all?
It's
str($P{key_to_parameters_map_element})
Quite intuitive, isn't it?

Getting filemaker error "specified field is not found" during enter find and set field

I'm using the code to perform a find in filemaker and getting an error message that the specified field is not found. Does anyone see what I'm missing?
Enter Find Mode []
Set Field [Contact Data::car ; "--" ]
Set Error Capture [on]
Perform Find[]
There is nothing wrong with find step as the error capture set on just before this script step, so it should not produce an error message.
I think there is a problem with the related field (Contact Data::car) and it is not directly related to the current layout relationship.
The simplest way to check it is to run the same query manually.