Forum
Paypal Express straight to cancel page
Hi
My checkout is going straight to my cancel page rather than going to paypal. I checked on a forum post where you mentioned adding PerchUtil::hold_redirects(); and below is my debug (just the payment failed part)... I've X'ed out some username and password info
My return and cancel urls are full, rather than relative.
Payment failed
Omnipay\PayPal\Message\ExpressAuthorizeResponse Object
(
[liveCheckoutEndpoint:protected] => https://www.paypal.com/cgi-bin/webscr
[testCheckoutEndpoint:protected] => https://www.sandbox.paypal.com/cgi-bin/webscr
[request:protected] => Omnipay\PayPal\Message\ExpressAuthorizeRequest Object
(
[liveEndpoint:protected] => https://api-3t.paypal.com/nvp
[testEndpoint:protected] => https://api-3t.sandbox.paypal.com/nvp
[parameters:protected] => Symfony\Component\HttpFoundation\ParameterBag Object
(
[parameters:protected] => Array
(
[username] => XXXXXXXXXXXXXXXX
[password] => XXXXXXXXXXXXXXXX
[signature] => XXXXXXXXXXXXXXXX
[testMode] => 1
[solutionType] => Sole
[landingPage] => Billing
[brandName] =>
[headerImageUrl] =>
[logoImageUrl] =>
[borderColor] =>
[returnUrl] => https://euromed.fullfatwebsitedesign.co.uk/shop/success
[cancelUrl] => https://euromed.fullfatwebsitedesign.co.uk/shop/cancel
[amount] => 179.97
[currency] => GBP
[transactionId] => 17
[clientIp] => 81.138.11.108
[description] => Order #17
[card] => Omnipay\Common\CreditCard Object
(
[supported_cards:protected] => Array
(
[visa] => /^4\d{12}(\d{3})?$/
[mastercard] => /^(5[1-5]\d{4}|677189)\d{10}$/
[discover] => /^(6011|65\d{2}|64[4-9]\d)\d{12}|(62\d{14})$/
[amex] => /^3[47]\d{13}$/
[diners_club] => /^3(0[0-5]|[68]\d)\d{11}$/
[jcb] => /^35(28|29|[3-8]\d)\d{12}$/
[switch] => /^6759\d{12}(\d{2,3})?$/
[solo] => /^6767\d{12}(\d{2,3})?$/
[dankort] => /^5019\d{12}$/
[maestro] => /^(5[06-8]|6\d)\d{10,17}$/
[forbrugsforeningen] => /^600722\d{10}$/
[laser] => /^(6304|6706|6709|6771(?!89))\d{8}(\d{4}|\d{6,7})?$/
)
[parameters:protected] => Symfony\Component\HttpFoundation\ParameterBag Object
(
[parameters:protected] => Array
(
[billingFirstName] => wefw
[shippingFirstName] => wefw
[billingLastName] => fwefwf
[shippingLastName] => fwefwf
[billingAddress1] => regerger
[billingAddress2] => gerger
[billingCity] => gergerger
[billingPostcode] => ergergerg
[billingState] => gergerg
[billingCountry] => GB
[shippingAddress1] => regerger
[shippingAddress2] => gerger
[shippingCity] => gergerger
[shippingPostcode] => ergergerg
[shippingState] => gergerg
[shippingCountry] => GB
[billingCompany] =>
[shippingCompany] =>
[email] => wefwf@swefwefwefw.co.uk
)
)
)
[transactionReference] => 17
)
)
[httpClient:protected] => Guzzle\Http\Client Object
(
[defaultHeaders:protected] => Guzzle\Common\Collection Object
(
[data:protected] => Array
(
)
)
[userAgent:protected] => Guzzle/3.9.3 curl/7.38.0 PHP/5.4.45
[config:Guzzle\Http\Client:private] => Guzzle\Common\Collection Object
(
[data:protected] => Array
(
[curl.options] => Array
(
[78] => 60
[10065] => /home/fullfatwebsite/public_html/euromed/perch/addons/apps/perch_shop/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem
[64] => 1
[81] => 2
)
)
)
[baseUrl:Guzzle\Http\Client:private] =>
[curlMulti:Guzzle\Http\Client:private] => Guzzle\Http\Curl\CurlMultiProxy Object
(
[handles:protected] => Array
(
[0] => Guzzle\Http\Curl\CurlMulti Object
(
[multiHandle:protected] => Resource id #188
[requests:protected] => Array
(
)
[handles:protected] => SplObjectStorage Object
(
[storage:SplObjectStorage:private] => Array
(
)
)
[resourceHash:protected] => Array
(
)
[exceptions:protected] => Array
(
)
[successful:protected] => Array
(
)
[multiErrors:protected] => Array
(
[1] => Array
(
[0] => CURLM_BAD_HANDLE
[1] => The passed-in handle is not a valid CURLM handle.
)
[2] => Array
(
[0] => CURLM_BAD_EASY_HANDLE
[1] => An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle.
)
[3] => Array
(
[0] => CURLM_OUT_OF_MEMORY
[1] => You are doomed.
)
[4] => Array
(
[0] => CURLM_INTERNAL_ERROR
[1] => This can only be returned if libcurl bugs. Please report it to us!
)
)
[selectTimeout:protected] => 1
[eventDispatcher:protected] => Symfony\Component\EventDispatcher\EventDispatcher Object
(
[listeners:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
(
)
[sorted:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
(
)
)
)
)
[groups:protected] => Array
(
)
[queued:protected] => Array
(
)
[maxHandles:protected] => 3
[selectTimeout:protected] => 1
[eventDispatcher:protected] => Symfony\Component\EventDispatcher\EventDispatcher Object
(
[listeners:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
(
)
[sorted:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
(
)
)
)
[uriTemplate:Guzzle\Http\Client:private] => Guzzle\Parser\UriTemplate\UriTemplate Object
(
[template:Guzzle\Parser\UriTemplate\UriTemplate:private] =>
[variables:Guzzle\Parser\UriTemplate\UriTemplate:private] =>
[regex:Guzzle\Parser\UriTemplate\UriTemplate:private] => /\{([^\}]+)\}/
)
[requestFactory:protected] => Guzzle\Http\Message\RequestFactory Object
(
[methods:protected] => Array
(
[getInstance] => 0
[__construct] => 1
[fromMessage] => 2
[fromParts] => 3
[create] => 4
[cloneRequestWithMethod] => 5
[applyOptions] => 6
[visit_headers] => 7
[visit_body] => 8
[visit_allow_redirects] => 9
[visit_auth] => 10
[visit_query] => 11
[visit_cookies] => 12
[visit_events] => 13
[visit_plugins] => 14
[visit_exceptions] => 15
[visit_save_to] => 16
[visit_params] => 17
[visit_timeout] => 18
[visit_connect_timeout] => 19
[visit_debug] => 20
[visit_verify] => 21
[visit_proxy] => 22
[visit_cert] => 23
[visit_ssl_key] => 24
)
[requestClass:protected] => Guzzle\Http\Message\Request
[entityEnclosingRequestClass:protected] => Guzzle\Http\Message\EntityEnclosingRequest
)
[eventDispatcher:protected] => Symfony\Component\EventDispatcher\EventDispatcher Object
(
[listeners:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
(
[request.sent] => Array
(
[100] => Array
(
[0] => Array
(
[0] => Guzzle\Http\RedirectPlugin Object
(
[defaultMaxRedirects:protected] => 5
)
[1] => onRequestSent
)
)
)
[request.clone] => Array
(
[0] => Array
(
[0] => Array
(
[0] => Guzzle\Http\RedirectPlugin Object
(
[defaultMaxRedirects:protected] => 5
)
[1] => cleanupRequest
)
)
)
[request.before_send] => Array
(
[0] => Array
(
[0] => Array
(
[0] => Guzzle\Http\RedirectPlugin Object
(
[defaultMaxRedirects:protected] => 5
)
[1] => cleanupRequest
)
)
)
)
[sorted:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
(
)
)
)
[httpRequest:protected] => Symfony\Component\HttpFoundation\Request Object
(
[attributes] => Symfony\Component\HttpFoundation\ParameterBag Object
(
[parameters:protected] => Array
(
)
)
[request] => Symfony\Component\HttpFoundation\ParameterBag Object
(
[parameters:protected] => Array
(
[first_name] => wefw
[last_name] => fwefwf
[email] => wefwf@swefwefwefw.co.uk
[password] => XXX
[password2] => XXX
[dob] => 2445
[college_school] => ergergerger
[facebook] => gergergreg
[address_1] => regerger
[address_2] => gerger
[city] => gergerger
[county] => gergerg
[postcode] => ergergerg
[country] => 236
[cms-form] => cmVnaXN0ZXI6cGVyY2hfc2hvcDovdGVtcGxhdGVzL3Nob3AvY2hlY2tvdXQvY3VzdG9tZXJfY3JlYXRlLmh0bWw6MTQ2NzY0NjM0NQ==
)
)
[query] => Symfony\Component\HttpFoundation\ParameterBag Object
(
[parameters:protected] => Array
(
)
)
[server] => Symfony\Component\HttpFoundation\ServerBag Object
(
[parameters:protected] => Array
(
[CONTENT_LENGTH] => 364
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/fullfatwebsite/public_html/euromed
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-us
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => PHPSESSID=d92f5238ba33274435a29aea0e1d8816; cmsa=1; p_m=; _ga=GA1.3.545451015.1463990455
[HTTP_HOST] => euromed.fullfatwebsitedesign.co.uk
[HTTP_ORIGIN] => https://euromed.fullfatwebsitedesign.co.uk
[HTTP_REFERER] => https://euromed.fullfatwebsitedesign.co.uk/shop/checkout
[HTTP_USER_AGENT] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17
[PATH] => /bin:/usr/bin
[QUERY_STRING] =>
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 81.138.11.108
[REMOTE_PORT] => 53747
[REQUEST_METHOD] => POST
[REQUEST_URI] => /shop/checkout.php
[SCRIPT_FILENAME] => /home/fullfatwebsite/public_html/euromed/shop/checkout.php
[SCRIPT_NAME] => /shop/checkout.php
[SERVER_ADDR] => 77.68.41.34
[SERVER_ADMIN] => webmaster@euromed.fullfatwebsitedesign.co.uk
[SERVER_NAME] => euromed.fullfatwebsitedesign.co.uk
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] =>
Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at euromed.fullfatwebsitedesign.co.uk Port 80
[SERVER_SOFTWARE] => Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4
[PHP_SELF] => /shop/checkout.php
[REQUEST_TIME_FLOAT] => 1467646363.2
[REQUEST_TIME] => 1467646363
[argv] => Array
(
)
[argc] => 0
)
)
[files] => Symfony\Component\HttpFoundation\FileBag Object
(
[parameters:protected] => Array
(
)
)
[cookies] => Symfony\Component\HttpFoundation\ParameterBag Object
(
[parameters:protected] => Array
(
[PHPSESSID] => d92f5238ba33274435a29aea0e1d8816
[cmsa] => 1
[p_m] => d0602cc825179fe4a2ca21ac3f3b7a0d0d309c94
[_ga] => GA1.3.545451015.1463990455
)
)
[headers] => Symfony\Component\HttpFoundation\HeaderBag Object
(
[headers:protected] => Array
(
[content-length] => Array
(
[0] => 364
)
[content-type] => Array
(
[0] => application/x-www-form-urlencoded
)
[accept] => Array
(
[0] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
)
[accept-encoding] => Array
(
[0] => gzip, deflate
)
[accept-language] => Array
(
[0] => en-us
)
[connection] => Array
(
[0] => keep-alive
)
[cookie] => Array
(
[0] => PHPSESSID=d92f5238ba33274435a29aea0e1d8816; cmsa=1; p_m=; _ga=GA1.3.545451015.1463990455
)
[host] => Array
(
[0] => euromed.fullfatwebsitedesign.co.uk
)
[origin] => Array
(
[0] => https://euromed.fullfatwebsitedesign.co.uk
)
[referer] => Array
(
[0] => https://euromed.fullfatwebsitedesign.co.uk/shop/checkout
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17
)
)
[cacheControl:protected] => Array
(
)
)
[content:protected] =>
[languages:protected] =>
[charsets:protected] =>
[encodings:protected] =>
[acceptableContentTypes:protected] =>
[pathInfo:protected] =>
[requestUri:protected] =>
[baseUrl:protected] =>
[basePath:protected] =>
[method:protected] =>
[format:protected] =>
[session:protected] =>
[locale:protected] =>
[defaultLocale:protected] => en
)
[response:protected] => Omnipay\PayPal\Message\ExpressAuthorizeResponse Object
*RECURSION*
[zeroAmountAllowed:protected] => 1
[negativeAmountAllowed:protected] =>
)
[data:protected] => Array
(
[TIMESTAMP] => 2016-07-04T15:32:45Z
[CORRELATIONID] => 2c5af53b3b5f8
[ACK] => Failure
[VERSION] => 119.0
[BUILD] => 23255924
[L_ERRORCODE0] => 10412
[L_SHORTMESSAGE0] => Duplicate invoice
[L_LONGMESSAGE0] => Payment has already been made for this InvoiceID.
[L_SEVERITYCODE0] => Error
)
)
Diagnostics
Perch: 2.8.30, PHP: 5.4.45, MySQL: 5.5.46, with MySQLi
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.30), assets (2.8.30), categories (2.8.30), perch_shop_orders (PERCH_SHOP_VERSION), perch_shop_products (PERCH_SHOP_VERSION), perch_shop (1.0.6), perch_members (1.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_members', 'perch_shop', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/fullfatwebsite/public_html/euromed/perch
PERCH_CORE: /home/fullfatwebsite/public_html/euromed/perch/core
PERCH_RESFILEPATH: /home/fullfatwebsite/public_html/euromed/perch/resources
Image manipulation: GD
PHP limits: Max upload 5M, Max POST 128M, Memory: 128M, Total max file upload: 5M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/fullfatwebsite/public_html/euromed
HTTP_HOST: euromed.fullfatwebsitedesign.co.uk
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Do you have two systems using the same invoice IDs?
Not that I know of.
The site was working OK, then I updated my local version to.30, then uploaded to a testing server... I wonder if I'm now re-testing on invoice ID already completed. I will check
Hi Drew
That was the issue. I had deleted the members/customers and orders within Perch, but they hadn't deleted from the database, so it was trying to use the ID's again.
Should it be deleting the entries in the database when I delete within Perch?
They won't get deleted - just marked as deleted. You don't want to be dropping that data as it'll mess up your reporting. Just make sure that you're not reusing order numbers.
Thanks Drew. I'll rollback to an earlier MySQL before I started dropping the data.
Where do I specify what number ID to start from?
It's tracked in the
perch2_shop_orders_meta
table.having this same issue on a fresh install new DB and files
whats the fix ?
perch2_shop_orders_meta is 0
Not sure with a new install as my issue was due to using a different version of the database where the order ID was already used.
I would try this to see whats going on and then make your own thread with the diagnostics and debug message as you'll have a better chance of a reply.
Add this before your call to perch_shop_checkout()
and make sure debug is on.