15,670,416 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Python questions
View Javascript questions
View C++ questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by huhuhhuhuh (Top 2 by date)
huhuhhuhuh
12-Nov-21 5:03am
View
Hi,
Yes, i'm getting the payload with the following code within php (in WHMCS it's a hook in php):
$command = 'GetOrders';
$postData = array(
'id' => '1',
);
$adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later
$results = localAPI($command, $postData, $adminUsername);
The following works, if i test it on the following site but it doesn't work within the WHMCS app, when i decode the $results variable. Why? (It's php 7.4.16 on the server):
https://sandbox.onlinephpfunctions.com/
$obj = '{"result":"success","totalresults":1,"startnumber":0,"numreturned":1,"orders":{"order":[{"id":6,"ordernum":8015255572,"userid":3,"contactid":0,"requestor_id":0,"admin_requestor_id":2,"date":"2021-11-05 13:21:32","nameservers":"","transfersecret":"","renewals":"","promocode":"","promotype":"","promovalue":"","orderdata":"[]","amount":"0.00","paymentmethod":"banktransfer","invoiceid":3,"status":"Pending","ipaddress":"xxx","fraudmodule":"","fraudoutput":"","notes":"","paymentmethodname":"Bank Transfer","paymentstatus":"Paid","name":"Emma Test","currencyprefix":"\u20ac","currencysuffix":" EUR","frauddata":"","validationdata":"","lineitems":{"lineitem":[{"type":"product","relid":9,"producttype":"Other Product\/Service","product":"xxx","domain":"xxx","billingcycle":"Free Account","amount":{},"status":"Pending"},{"type":"addon","relid":3,"producttype":"Addon","product":"Exchange Postfach","domain":"","billingcycle":"Free Account","amount":{},"status":"Pending"}]}}]}}';
$decoded = json_decode($obj,true);
echo $decoded['orders']['order'][0]['ordernum'];
huhuhhuhuh
2-Dec-20 10:55am
View
The support answered this but it's not the case (https://www.screenpresso.com/de/support/hot-keys/). It's installed in Program Files so it's not a Security Problem?!