
Originally Posted by
DrByte
Um ... The error suggests that you've changed the PHP files associated with this module. If it was something Square did only on their end, the error would be different.
What's the back-story of changes to the PHP files?
Which set of files are you using? v0.9xxx? or 1.0-beta? Or a hybrid of files that you've changed independently?
Ah, you are correct. I modified modules\payment\square.php around line 318 to add extra information about the order to the description passed to square:
Code:
if (sizeof($order->products) < 100) {
$p = '';
for ($i = 0; $i < sizeof($order->products); $i++) {
$p2 = $order->products[$i];
if (!$p == '') {
$p .= ', ';
}
$p .= '(' . $p2['qty'] . ') ' . $p2['name'] ;
}
}
$p = 'Item(s) Ordered:' . $p;
$d = 'Delivery Address: ' . $order->delivery['street_address'] . ', ' . $order->delivery['city'] . ', ' . $order->delivery['state'] . ' ' . $order->delivery['postcode'] . ' tel:' . $order->customer['telephone'];
$p .= '; ' . $d;
$note = htmlentities(trim($order->billing['firstname'] . ' ' . $order->billing['lastname'] . ' ' . $p . ' ' . STORE_NAME));
I had done this for the Stripe module and it worked great there because it basically duplicated the order information on the email that Stripe sent out to customers, which helped reassure them. The average order at my store is $3.5k, and some people are apprehensive about making such big purchases on the internet.
I recently switched from Stripe to Square, and that is the reason for the module change. I will go read up how long the note field can be and modify the code to fit.
Edit: So I reverted the payment module files back to the 1.0-beta (which is the version I'm using) and I still have the OAuthApi.php line 134 error.