I got a problem with order status when i use the PayPal standard payment method. When a customer place an order and go to PayPal to make the payment, this happens:
When paying with credit card:
If the customer click on the "back to store" button, the order get status Paid (sometimes Awaiting payment).
If the customer don not click on the "back to store" button, the order get status Awaiting payment.
When paying through his/hers PayPal account:
If the customer click on the "back to store" button, the order get status Awaiting payment.
If the customer don not click on the "back to store" button, the order get status Awaiting payment.
Why is this happening? All of these cases should have the status Paid.
I'am running OpenCart 1.4.9.3
I am logging the $_SERVER['QUERY_STRING'], and i can see that PayPal is visiting my site after a payment is done. PayPal is visiting these urls:
route=payment/pp_standard/callback
route=checkout/success
Here are my PayPal standard payment settings:
Sandbox Mode = no
Transaction Method = Sale
Geo Zone = All Zones
Status = Enabled
Sort Order = 1
Debug Mode = Enabled
Order Status Completed = Paid
Order Status Pending = Awaiting payment
Order Status Denied = Denied
Order Status Failed = Failed
Order Status Refunded = Refunded
Order Status Canceled Reversal = Canceled Reversal
Order Status Reversed = Reversed
Order Status Unspecified Error = Error
Here is my error log from OpenCart admin:
2011-03-04 14:07:23 - PP_STANDARD :: PDT INIT <-- DEBUG GET VARS::tx=8T411493SG3786029&st=Completed&amt=0.13&cc=NOK&cm=Z6ur&item_number=&route=payment/pp_standard/pdt&merchant_return_link=Gå tilbake til MobiSoft&form_charset=UTF-8&
2011-03-04 14:07:25 - PP_STANDARD :: PDT REQ --> cmd=_notify-synch&tx=8T411493SG3786029&at=0ZwIRb_tLRqo74aPXtHov4j25XXdpMNu30Ukj7b9GZ_HOm872xcYQcvs6by
2011-03-04 14:07:25 - PP_STANDARD :: PDT RESP <-- SUCCESS&mc_gross=0.13&invoice=226+-+Geir+Olsen&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=1000&tax=0.00&item_number2=weight.weight_10&payer_id=6KUDTSCVEQ9DG&item_number3=Skatt&address_street=%C5svegen+13&payment_date=06%3A07%3A18+Mar+04%2C+2011+PST&payment_status=Completed&charset=windows-1252&address_zip=4700&mc_shipping=0.00&mc_handling=0.00&first_name=Geir&mc_fee=0.13&address_country_code=NO&address_name=Geir+Olsen&custom=Z6ur&payer_status=unverified&business=post%40xxxx.com&address_country=Norway&num_cart_items=3&mc_handling1=0.00&mc_handling2=0.00&mc_handling3=0.00&address_city=Oslo&payer_email=Geir_Olsen%40xxxx.com&mc_shipping1=0.00&mc_shipping2=0.00&mc_shipping3=0.00&txn_id=8T411493SG3786029&payment_type=instant&last_name=Olsen&address_state=&item_name1=Smart+testen&receiver_email=Geir_Olsen%40xxxx.com&item_name2=Levert+med+posten++%28Vekt%3A+0.02kg%29&payment_fee=&item_name3=Skatt&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=5B87RKJ2V36UL&quantity3=1&txn_type=cart&discount=8.50&mc_gross_1=0.10&mc_currency=NOK&mc_gross_2=8.50&mc_gross_3=0.03&residence_country=NO&receipt_id=1054-0834-5396-8561&shipping_method=Default&transaction_subject=Z6ur&payment_gross=&
2011-03-04 14:07:36 - PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /var/www/vhosts/xxxx.com/httpdocs/system/library/request.php on line 31
2011-03-04 14:07:37 - PP_STANDARD :: IPN INIT <-- DEBUG POST VARS::mc_gross=0.13&invoice=226 - Geir Olsen&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=1000&tax=0.00&item_number2=weight.weight_10&payer_id=6KUDTSCVEQ9DG&item_number3=Skatt&address_street=&payment_date=06:07:18 Mar 04, 2011 PST&payment_status=Completed&charset=windows-1252&address_zip=4700&mc_shipping=0.00&mc_handling=0.00&first_name=Geir&mc_fee=0.13&address_country_code=NO&address_name=Geir Olsen¬ify_version=3.0&custom=Z6ur&payer_status=unverified&business=xxxxxx@xxxx.com&address_country=Norway&num_cart_items=3&mc_handling1=0.00&mc_handling2=0.00&mc_handling3=0.00&address_city=Oslo&verify_sign=AWHwKBMoVXhTmv6W8P6KccBSLnxQAza.ecCD6tUfyEtraHUFGPDKzohP&payer_email=xxxxxx@xxxx.com&mc_shipping1=0.00&mc_shipping2=0.00&mc_shipping3=0.00&txn_id=8T411493SG3786029&payment_type=instant&last_name=Olsen&address_state=&item_name1=Smart testen&receiver_email=xxxxxx@xxxx.com&item_name2=Levert med posten (Vekt: 0.02kg)&payment_fee=&item_name3=Skatt&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=5B87RKJ2V36UL&quantity3=1&txn_type=cart&discount=8.50&mc_gross_1=0.10&mc_currency=NOK&mc_gross_2=8.50&mc_gross_3=0.03&residence_country=NO&receipt_id=1054-0834-5396-8561&shipping_method=Default&transaction_subject=Z6ur&payment_gross=&
2011-03-04 14:07:38 - PP_STANDARD :: IPN REQ --> cmd=_notify-validate&mc_gross=0.13&invoice=226+-+Geir+Olsen&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=1000&tax=0.00&item_number2=weight.weight_10&payer_id=6KUDTSCVEQ9DG&item_number3=Skatt&address_street=&payment_date=06%3A07%3A18+Mar+04%2C+2011+PST&payment_status=Completed&charset=windows-1252&address_zip=4700&mc_shipping=0.00&mc_handling=0.00&first_name=Geir&mc_fee=0.13&address_country_code=NO&address_name=Geir+Olsen¬ify_version=3.0&custom=Z6ur&payer_status=unverified&business=post%40xxxx.com&address_country=Norway&num_cart_items=3&mc_handling1=0.00&mc_handling2=0.00&mc_handling3=0.00&address_city=Oslo&verify_sign=AWHwKBMoVXhTmv6W8P6KccBSLnxQAza.ecCD6tUfyEtraHUFGPDKzohP&payer_email=Geir_Olsen%40xxxx.com&mc_shipping1=0.00&mc_shipping2=0.00&mc_shipping3=0.00&txn_id=8T411493SG3786029&payment_type=instant&last_name=Olsen&address_state=&item_name1=Smart+testen&receiver_email=Geir_Olsen%40xxxx.com&item_name2=Levert+med+posten++%28Vekt%3A+0.02kg%29&payment_fee=&item_name3=Skatt&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=5B87RKJ2V36UL&quantity3=1&txn_type=cart&discount=8.50&mc_gross_1=0.10&mc_currency=NOK&mc_gross_2=8.50&mc_gross_3=0.03&residence_country=NO&receipt_id=1054-0834-5396-8561&shipping_method=Default&transaction_subject=Z6ur&payment_gross=
2011-03-04 14:07:38 - PP_STANDARD :: IPN RESP <-- INVALID
2011-03-04 14:07:39 - PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /var/www/vhosts/xxxx.com/httpdocs/system/library/request.php on line 31
2011-03-04 14:23:39 - PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /var/www/vhosts/xxxx.com/httpdocs/system/library/request.php on line 31
2011-03-04 14:23:39 - PP_STANDARD :: IPN INIT <-- DEBUG POST VARS::mc_gross=0.13&invoice=227 - Berit Eriksen&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=1000&tax=0.00&item_number2=weight.weight_10&payer_id=WTQYSYTFD2DGE&item_number3=Skatt&address_street=&payment_date=06:23:11 Mar 04, 2011 PST&payment_status=Completed&charset=windows-1252&address_zip=4700&mc_shipping=0.00&mc_handling=0.00&first_name=Berit&mc_fee=0.13&address_country_code=NO&address_name=Berit Eriksen¬ify_version=3.0&custom=Z6us&payer_status=unverified&business=xxxxxx@xxxx.com&address_country=Norway&num_cart_items=3&mc_handling1=0.00&mc_handling2=0.00&mc_handling3=0.00&address_city=Oslo&verify_sign=AfcJQ6hE4rGj.0wMpKgV9A4.VEDWAq4pR1tAq95R4EPWIeWV7-zOHEJe&payer_email=xxxxxx@xxxx.com&mc_shipping1=0.00&mc_shipping2=0.00&mc_shipping3=0.00&txn_id=6MH64379GS950815C&payment_type=instant&last_name=Eriksen&address_state=Vest Agder&item_name1=Smart testen&receiver_email=xxxxxx@xxxx.com&item_name2=Levert med posten (Vekt: 0.02kg)&payment_fee=&item_name3=Skatt&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=5B87RKJ2V36UL&quantity3=1&txn_type=cart&discount=8.50&mc_gross_1=0.10&mc_currency=NOK&mc_gross_2=8.50&mc_gross_3=0.03&residence_country=NO&shipping_method=Default&transaction_subject=Z6us&payment_gross=&
2011-03-04 14:23:42 - PP_STANDARD :: IPN REQ --> cmd=_notify-validate&mc_gross=0.13&invoice=227+-+Berit+Eriksen&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=1000&tax=0.00&item_number2=weight.weight_10&payer_id=WTQYSYTFD2DGE&item_number3=Skatt&address_street=&payment_date=06%3A23%3A11+Mar+04%2C+2011+PST&payment_status=Completed&charset=windows-1252&address_zip=4700&mc_shipping=0.00&mc_handling=0.00&first_name=Berit&mc_fee=0.13&address_country_code=NO&address_name=Berit+Eriksen¬ify_version=3.0&custom=Z6us&payer_status=unverified&business=post%40xxxx.com&address_country=Norway&num_cart_items=3&mc_handling1=0.00&mc_handling2=0.00&mc_handling3=0.00&address_city=Oslo&verify_sign=AfcJQ6hE4rGj.0wMpKgV9A4.VEDWAq4pR1tAq95R4EPWIeWV7-zOHEJe&payer_email=krh35%40xxxx.com&mc_shipping1=0.00&mc_shipping2=0.00&mc_shipping3=0.00&txn_id=6MH64379GS950815C&payment_type=instant&last_name=Eriksen&address_state=Vest+Agder&item_name1=Smart+testen&receiver_email=Geir_Olsen%40xxxx.com&item_name2=Levert+med+posten++%28Vekt%3A+0.02kg%29&payment_fee=&item_name3=Skatt&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=5B87RKJ2V36UL&quantity3=1&txn_type=cart&discount=8.50&mc_gross_1=0.10&mc_currency=NOK&mc_gross_2=8.50&mc_gross_3=0.03&residence_country=NO&shipping_method=Default&transaction_subject=Z6us&payment_gross=
2011-03-04 14:23:42 - PP_STANDARD :: IPN RESP <-- INVALID
2011-03-04 14:23:43 - PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /var/www/vhosts/xxxx.com/httpdocs/system/library/request.php on line 31
2011-03-04 14:25:51 - PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /var/www/vhosts/xxxx.com/httpdocs/system/library/request.php on line 31
2011-03-04 14:25:51 - PP_STANDARD :: IPN INIT <-- DEBUG POST VARS::mc_gross=0.13&invoice=228 - Berit Eriksen&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=1000&tax=0.00&item_number2=weight.weight_10&payer_id=WTQYSYTFD2DGE&item_number3=Skatt&address_street=&payment_date=06:25:47 Mar 04, 2011 PST&payment_status=Completed&charset=windows-1252&address_zip=4700&mc_shipping=0.00&mc_handling=0.00&first_name=Berit&mc_fee=0.13&address_country_code=NO&address_name=Berit Eriksen¬ify_version=3.0&custom=Z6ut&payer_status=unverified&business=xxxxxx@xxxx.com&address_country=Norway&num_cart_items=3&mc_handling1=0.00&mc_handling2=0.00&mc_handling3=0.00&address_city=Oslo&verify_sign=AX8ieAkKpYYejWHnkQpJQhiSXfgJAX52oPTtJh0ykOrWORkG81Txl.AX&payer_email=xxxxxx@xxxx.com&mc_shipping1=0.00&mc_shipping2=0.00&mc_shipping3=0.00&txn_id=6LC46226FR1411633&payment_type=instant&last_name=Eriksen&address_state=Vest Agder&item_name1=Smart testen&receiver_email=xxxxxx@xxxx.com&item_name2=Levert med posten (Vekt: 0.02kg)&payment_fee=&item_name3=Skatt&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=5B87RKJ2V36UL&quantity3=1&txn_type=cart&discount=8.50&mc_gross_1=0.10&mc_currency=NOK&mc_gross_2=8.50&mc_gross_3=0.03&residence_country=NO&shipping_method=Default&transaction_subject=Z6ut&payment_gross=&
2011-03-04 14:25:53 - PP_STANDARD :: PDT INIT <-- DEBUG GET VARS::route=payment/pp_standard/pdt&tx=6LC46226FR1411633&st=Completed&amt=0.13&cc=NOK&cm=Z6ut&item_number=&
2011-03-04 14:25:53 - PP_STANDARD :: IPN REQ --> cmd=_notify-validate&mc_gross=0.13&invoice=228+-+Berit+Eriksen&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=1000&tax=0.00&item_number2=weight.weight_10&payer_id=WTQYSYTFD2DGE&item_number3=Skatt&address_street=&payment_date=06%3A25%3A47+Mar+04%2C+2011+PST&payment_status=Completed&charset=windows-1252&address_zip=4700&mc_shipping=0.00&mc_handling=0.00&first_name=Berit&mc_fee=0.13&address_country_code=NO&address_name=Berit+Eriksen¬ify_version=3.0&custom=Z6ut&payer_status=unverified&business=post%40xxxx.com&address_country=Norway&num_cart_items=3&mc_handling1=0.00&mc_handling2=0.00&mc_handling3=0.00&address_city=Oslo&verify_sign=AX8ieAkKpYYejWHnkQpJQhiSXfgJAX52oPTtJh0ykOrWORkG81Txl.AX&payer_email=krh35%40xxxx.com&mc_shipping1=0.00&mc_shipping2=0.00&mc_shipping3=0.00&txn_id=6LC46226FR1411633&payment_type=instant&last_name=Eriksen&address_state=Vest+Agder&item_name1=Smart+testen&receiver_email=Geir_Olsen%40xxxx.com&item_name2=Levert+med+posten++%28Vekt%3A+0.02kg%29&payment_fee=&item_name3=Skatt&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=5B87RKJ2V36UL&quantity3=1&txn_type=cart&discount=8.50&mc_gross_1=0.10&mc_currency=NOK&mc_gross_2=8.50&mc_gross_3=0.03&residence_country=NO&shipping_method=Default&transaction_subject=Z6ut&payment_gross=
2011-03-04 14:25:53 - PP_STANDARD :: IPN RESP <-- INVALID
2011-03-04 14:25:54 - PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /var/www/vhosts/xxxx.com/httpdocs/system/library/request.php on line 31
2011-03-04 14:25:56 - PP_STANDARD :: PDT REQ --> cmd=_notify-synch&tx=6LC46226FR1411633&at=0ZwIRb_tLRqo74aPXtHov4j25XXdpMNu30Ukj7b9GZ_HOm872xcYQcvs6by
2011-03-04 14:25:56 - PP_STANDARD :: PDT RESP <-- SUCCESS&mc_gross=0.13&invoice=228+-+Berit+Eriksen&protection_eligibility=Ineligible&address_status=unconfirmed&item_number1=1000&tax=0.00&item_number2=weight.weight_10&payer_id=WTQYSYTFD2DGE&item_number3=Skatt&address_street=%C5svegen+13&payment_date=06%3A25%3A47+Mar+04%2C+2011+PST&payment_status=Completed&charset=windows-1252&address_zip=4700&mc_shipping=0.00&mc_handling=0.00&first_name=Berit&mc_fee=0.13&address_country_code=NO&address_name=Berit+Eriksen&custom=Z6ut&payer_status=unverified&business=post%40xxxx.com&address_country=Norway&num_cart_items=3&mc_handling1=0.00&mc_handling2=0.00&mc_handling3=0.00&address_city=Oslo&payer_email=krh35%40xxxx.com&mc_shipping1=0.00&mc_shipping2=0.00&mc_shipping3=0.00&txn_id=6LC46226FR1411633&payment_type=instant&last_name=Eriksen&address_state=Vest+Agder&item_name1=Smart+testen&receiver_email=Geir_Olsen%40xxxx.com&item_name2=Levert+med+posten++%28Vekt%3A+0.02kg%29&payment_fee=&item_name3=Skatt&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=5B87RKJ2V36UL&quantity3=1&txn_type=cart&discount=8.50&mc_gross_1=0.10&mc_currency=NOK&mc_gross_2=8.50&mc_gross_3=0.03&residence_country=NO&shipping_method=Default&transaction_subject=Z6ut&payment_gross=&