worldpay / worldpay-lib-php Goto Github PK
View Code? Open in Web Editor NEWPHP Library for Worldpay REST API
Home Page: https://online.worldpay.com
License: MIT License
PHP Library for Worldpay REST API
Home Page: https://online.worldpay.com
License: MIT License
Without the packagist it's pain to integrate the package to the project.
The api documentation https://online.worldpay.com/api-reference#getorder lists a method to get an order. this is not implemented yet.
Please implement createToken function according to this link documentation
Using Standard Payment
connection.php curl json before sending
{"firstName":"dsaf","lastName":"sadf","address1":"123 House Road","address2":"","address3":"","postalCode":"3434343","city":"sadfsaf","state":"BA","countryCode":"PK"},"billingAddress":{"address1":"123 House Road","address2":"A village","address3":"A village","postalCode":"3434343","city":"sadfsaf","state":"BA","countryCode":"PK"},"shopperEmailAddress":"[email protected]","orderCodePrefix":"","orderCodeSuffix":"","orderDescription":"Order 194","amount":4300,"currencyCode":"GBP","name":"sf asdfasfasd","customerOrderCode":"193","token":"TEST_RU_4083e286-2510-40b6-ba95-0e5a03ea0b1f","shopperIpAddress":"127.0.0.1","shopperSessionId":"ik2bdsmgt8l5v6mldomt4j6jki","shopperUserAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0","settlementCurrency":"GBP"}
over and over again getting this error
Error description: Some of request parameters are invalid, please check your request. For more information please refer to Json schema. Error message: This card is not accepted for Test transactions
Am I missing anything or something need to be correct?
Hi I'm using this code however when i submit my code i get the below error:
{"httpStatusCode":401,"customCode":"UNAUTHORIZED","message":"No pre-authenticated principal found in request.","description":"Request can't be authorized, please validate your request","errorHelpUrl":null,"originalRequest":"http://api.worldpay.com/v1/tokens/TOKEN_HERE"}
Why is my request not being authorized? I have all the neccessary client_key and service_key in my request and it mirrors the code example in "index_cardonfile.php".
Previously my code worked fine until around 1st July 2017, then this error started to appear.
It would be nice to be able to get the response for captureAuthorizedOrder().
In the case where the $amount is specified and a $json is present, the $expectResponse parameter is set to true for the sendRequest() method. But there is no way for the end user to retrieve that response because the captureAuthorizedOrder() doesn't return anything.
It would also be nice to retrieve the response irrespective of whether the $amount is specified or not.
Or is there a reason why the response is not returned?
Earlier I was working on the sendbox mode and everything worked fine for me. Now I just moved on the live and updated the CLIENT_KEY and SECRET_KEY but getting "You must enable SSL check in production mode" issue. I already configured SSL on my site and site working perfectly with https.
Can anyone suggest the solution?
Hello,
I'm experiencing issues creating order with Worldpay API. I tried running your own call as found here https://developer.worldpay.com/jsonapi/docs/make-payment:
curl https://api.worldpay.com/v1/orders -H "Authorization:T_S_<HIDDEN>" -H "Content-type: application/json" -X POST -d '{ "token" : "TEST_SU_<HIDDEN>", "orderDescription" : "your-order-description", "amount" : 500, "currencyCode" : "GBP" }'
and here's what I get:
< HTTP/1.1 400 Bad Request
< Content-Type: application/json;charset=UTF-8
< Date: Fri, 25 Nov 2016 08:19:49 GMT
< requestId: ef0e0b6b-8a50-4810-b8d1-bbc77d1a7753
* Server Windows NT 3.x is not blacklisted
< Server: Windows NT 3.x
< X-Content-Type-Options: nosniff
< Content-Length: 221
< Connection: keep-alive
<
{"httpStatusCode":400,"customCode":"ERROR_PARSING_JSON","message":"Error parsing json, please check json request","description":"Error parsing Json, please refer to json schema","errorHelpUrl":null,"originalRequest":"'{"}* Connection #0 to host api.worldpay.com left intact
Can you check it please ?
Stephane
Library is not compatible with Composer, but it would be nice to have it on packagist.org.
An exception thrown when we try to call authorize3DSOrder function.
What does the worldpay_sessionid it refer to ?
I made a pull request #7
Please merge it to the upstream. Thank you.
Why does Worldpay enforce whole numbers for payment?
I'd like to pay: 2.50
. Why can't I?
worldpay-lib-php/lib/AbstractOrder.php
Lines 46 to 48 in df4c9fe
worldpay-lib-php/lib/Utils.php
Lines 13 to 16 in df4c9fe
Hi
When making payment requests, I am always getting the following response:
[httpStatusCode] => 404
[customCode] => TKN_NOT_FOUND
[message] => EXT_1: Token does not exist
[description] => Token used with request does not exist, please create a new token
[errorHelpUrl] =>
[originalRequest] =>
We are submitting the customer payment details using the template form, which is successfully returning a token. Our Worldpay template form settings are as follows:
Worldpay.useTemplateForm({
'clientKey':'<?=$data['client_key']?>',
'form':'payment_method',
'paymentSection':'payment_section',
'display':'inline',
'reusable':true,
'callback': function(obj) {
if (obj && obj.token) {
var _el = document.createElement('input');
_el.value = obj.token;
_el.type = 'hidden';
_el.name = 'token';
document.getElementById('payment_method').appendChild(_el);
document.getElementById('payment_method').submit();
}
}
});
This token is then being posted to the next stage of our checkout, which then then makes the payment request shown below (sensitive information omitted for security):
{
"amount":1699,
"billingAddress":
{
"address1":"",
"city":"",
"postalCode":"",
"countryCode":"GB"
},
"currencyCode":"GBP",
"deliveryAddress":
{
"firstName":"",
"lastName":"",
"address1":"",
"address2":"",
"city":"",
"postalCode":"",
"countryCode":"GB",
"telephoneNumber":"01234567890"
},
"is3DSOrder":true,
"name":"",
"orderDescription":"",
"orderType":"ECOM",
"shopperAcceptHeader":"text\/html,application\/xhtml+xml,application\/xml;q=0.9, image\/webp,image\/apng,*\/*;q=0.8",
"shopperEmailAddress":"",
"shopperIpAddress":"",
"shopperSessionId":"WEB77-648",
"shopperUserAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/61.0.3163.100 Safari\/537.36",
"token":"TESTRU44bea883-bd8b-4b5b-8643-298787978cdc"
}
Our WorldPay account is currently in test mode, so we are using the test client and service keys.
When the worldpay.js creates and returns the token, does it automatically save the token on Worldpay, or is there something else that we must do to save the token?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.