tolzhabayev / sagepayform-php Goto Github PK
View Code? Open in Web Editor NEWA simple class to integrate sagepayForm into your website
A simple class to integrate sagepayForm into your website
I get the following error:
mcrypt_encrypt(): Attempt to use an empty IV, which is NOT recommend
hi,
thanks for class. there is a mssing ?> in form code.
value= "<?php echo $sagePay->getCrypt()">
regards
I used your class for a project. It worked nice but I'd had problems getting and decrypting the crypt data from the SagePay.
A solution which helped was to change a bit the ' decodeAndDecrypt' function.
I changed this row of the the decodeAndDecrypt function in the SagePay.php :
return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->encryptPassword, $strIn, MCRYPT_MODE_CBC);
to:
return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->encryptPassword, $strIn, MCRYPT_MODE_CBC, $this->encryptPassword);
Now everything work just fine for me :)
I hope that his make some sense an thanks for a very good work ...
Hi,
I have been using this for our eBay customers to pay by card successfully for several months.
I have just gone to send a customer a link and thought I check it's still working as expected, but got the error:
5080 : Form transaction registration failed.
I tried to use your default index.php code and just checked the vendor, but got the same error?
I have tried setting it to use the test and live urls, but keep getting this same error.
I will contact SagePay to see if anything has changed and if they can help troubleshoot, but thought I would raise it here as well.
Grateful for any help you can provide.
Chris
Warning: mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported
i have downloaded these files and added my encryption password to sagepay.php and also added my values to the vendor name within the form and the vendortxtcode etc. When i process the form i get a 5005 error - do i need to install Sage's integration kit for PHP or does this replace their kit - am i missing something? Sorry, new to this :(
Sage Pay limits the length of most of the fields submitted. They are detailed here:
As far as I can see, this library doesn't check for that. Failing to limit them will cause the POST to fail.
Hi there,
I keep getting the error mentioned above, I am pretty sure that everything is in place and don't know where I am going wrong.
Any chance you could have a look?
Thanks,
$sagePay = new SagePay();
$sagePay->setCurrency('GBP');
$sagePay->setAmount('100');
$sagePay->setDescription('Breakdown Cover');
$sagePay->setBillingSurname('Bowers');
$sagePay->setBillingFirstnames('Scott');
$sagePay->setBillingCity('Wakefield');
$sagePay->setBillingPostCode('WF59TJ');
$sagePay->setBillingAddress1('1 The Gateway, Fryersway');
$sagePay->setBillingCountry('gb');
$sagePay->setDeliverySameAsBilling();
$sagePay->setSuccessURL($websiteRoot.'quote/step/6/success');
$sagePay->setFailureURL($websiteRoot.'quote/step/6/failure');
?>
Hi I'm having an issue where as it says the currency is not set when i'm proceeding to the payment page. I'm guessing its not the currency which is the issue but I'm stuck as to what else it could be? I've included all the required fields????
Despite adding $sagePay->setCurrency('GBP'); I get the following error: Status Detail: 3045 : The Currency field is missing. This currency is also set as GBP in the Sage control panel. Can you clarify?
I am using your code and always i am getting the same issue:
Status: INVALID
Status Detail: 5068 : The encryption method is not supported by this protocol version.
Can you pls tell me where is the problem??
I think anything wrong in the encryption password.
How can encrypt my password?
please replace it to support php 7
Hi Timur,
Hoping you can help. I'm using your simple Sage Pay form which is awesome but unfortunaltely i'm having an issue posting the input/name value to Sage Pay.
If i set the value as you have done in your example:
$sagePay->setCurrency('EUR');
$sagePay->setAmount('100');
$sagePay->setDescription('Lorem ipsum');
$sagePay->setBillingSurname('Mustermann');
etc
all works well and it goes to sage pay with no errors.
but
Is there a way of having the value of the input field post to Sage Pay so it's dynamic?
For example: $sagePay->setAmount($_POST['Amount']); $sagePay->setDescription($_POST['Description']);
$sagePay->setBillingFirstnames($_POST['BillingFirstnames']); $sagePay->setBillingSurname($_POST['BillingSurname']);
Would really appreciate any help on this...?
I have used this form and works great up until the success page.. I am getting a blank page i did a little test and it seems to not be able to pull or see that there is a encrypted content being sent via the url. I added a if else to check this and it is not pulling or seeing a value there so is not triggering the decode function..
Any help be great
Hi I need help I can't find encrypt password value.
This Library is not working always producing following:
This transaction attempt has failed. We are unable to redirect you back to the web store from which you were purchasing. The details of the failure are given below.
Status: MALFORMED
Status Detail: 3045 : The Currency field is missing.
So the user enters billing details and amount they wish to pay then this is sent to sagepay?
Would I just need to adapt the sagepay.php file so that the variables equal the post value of the field.
Or can I do this in the index.php where the form is. As the information would be set when the page loads but rather when the form is posted.
Not looking for a copy and paste answer just a point in the right direction.
For a while I was thinking that I was getting no success response, then I realised was just because as far as I know, you can't do this
print_r('<pre>'.$responseArray.'</pre>');
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.