Jump to content

ucardblitzer

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Activity
    User/Merchant

ucardblitzer's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you for posting however I have not test it yet , since I am trying to workout the API first.
  2. Thank you for your input,, now i fix it.. I have found the value which was "Completed_Funds_Held" and I added the following line: elseif (strcmp($payment_status, 'Completed_Funds_Held') === 0) { $payment_type = (int)Configuration::get('PS_OS_PAYPAL'); $message = $ppec->l('Pending payment confirmation.').'<br />'; }
  3. I somehow fix it, for some reason the $payment-type value was not properly stored but due to the knowledge limitation that I have in PHP i only manage to stored it on the end of the else statement, I hope someone can validate the changes it does not affect the overall code . currently the checkout is now working and need to fix the other issue (duplicate shopping cart using the same cart id for the same guest ID): I have added the following line in payment.php //added 11/30 $payment_type = (int)Configuration::get('PS_OS_PAYMENT'); //added 11/30 refer to the code below: function validateOrder($customer, $cart, $ppec) { $amount_match = $ppec->rightPaymentProcess(); $order_total = (float)$cart->getOrderTotal(true, Cart::BOTH); // Payment succeed if ($ppec->hasSucceedRequest() && !empty($ppec->token) && $amount_match) { if ((bool)Configuration::get('PAYPAL_CAPTURE')) { $payment_type = (int)Configuration::get('PS_OS_WS_PAYMENT'); $payment_status = 'Pending_capture'; $message = $ppec->l('Pending payment capture.').'<br />'; } else { if (isset($ppec->result['PAYMENTINFO_0_PAYMENTSTATUS'])) $payment_status = $ppec->result['PAYMENTINFO_0_PAYMENTSTATUS']; else $payment_status = 'Error'; if (strcmp($payment_status, 'Completed') === 0) { $payment_type = (int)Configuration::get('PS_OS_PAYMENT'); $message = $ppec->l('Payment accepted.').'<br />'; } elseif (strcmp($payment_status, 'Pending') === 0) { $payment_type = (int)Configuration::get('PS_OS_PAYPAL'); $message = $ppec->l('Pending payment confirmation.').'<br />'; } //added 11/30 $payment_type = (int)Configuration::get('PS_OS_PAYMENT'); //added 11/30 } } // Payment error else { //Check if error is 10486, if it is redirect user to paypal if ($ppec->result['L_ERRORCODE0'] == 10486) $ppec->redirectToAPI(); $payment_status = $ppec->result['PAYMENTINFO_0_PAYMENTSTATUS']; $payment_type = (int)Configuration::get('PS_OS_ERROR'); if ($amount_match) $message = implode('<br />', $ppec->logs).'<br />'; else $message = $ppec->l('Price paid on paypal is not the same that on PrestaShop.').'<br />'; } $transaction = PayPalOrder::getTransactionDetails($ppec, $payment_status); $ppec->context->cookie->id_cart = $cart->id; $ppec->validateOrder((int)$cart->id, $payment_type, $order_total, $ppec->displayName, $message, $transaction, (int)$cart->id_currency, false, $customer->secure_key, $ppec->context->shop); }
  4. Well, it will be helpful for us , if you can share on how you fix it.right now,I re-install my site and putting all together and still got the same issue... I am having a hard time to debug the code as my programmer level in PHP is beginner.
  5. Thank you for your valuable input, I will try to log the payment status type so that I am able to reveal what the value is. Anyway, is the paypal responses below is the one we are looking for ? BILLINGAGREEMENTACCEPTEDSTATUS -> 0 CHECKOUTSTATUS -> PaymentActionCompleted
  6. its 1.6.0.9 have re-upload the affected files with the original one. I think I have accidentally modify it when I am troubleshooting that module. Here is the new error that I have encountered upon checkout. Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in /home/uccard5/public_html/modules/paypal/paypal_orders.php on line 70 Notice: Undefined variable: payment_type in /home/uccard5/public_html/modules/paypal/express_checkout/payment.php on line 289 Notice: Undefined variable: message in /home/uccard5/public_html/modules/paypal/express_checkout/payment.php on line 289 Fatal error: Uncaught exception 'PrestaShopException' with message 'Can't load Order status' in /home/uccard5/public_html/classes/PaymentModule.php:174 Stack trace: #0 /home/uccard5/public_html/modules/paypal/paypal.php(1361): PaymentModuleCore->validateOrder(32, 0, 0.1, 'PayPal', NULL, Array, 1, false, 'd30b341786dc356...', Object(Shop)) #1 /home/uccard5/public_html/modules/paypal/express_checkout/payment.php(290): PayPal->validateOrder(32, NULL, 0.1, 'PayPal', NULL, Array, 1, false, 'd30b341786dc356...', Object(Shop)) #2 /home/uccard5/public_html/modules/paypal/express_checkout/payment.php(306): validateOrder(Object(Customer), Object(Cart), Object(PaypalExpressCheckout)) #3 {main} thrown in/home/uccard5/public_html/classes/PaymentModule.php on line 174
  7. I tried to test another set of cart and got this error with debugging enabled on my site: Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in /home/uccard5/public_html/modules/paypal/paypal_orders.php on line 70 Notice: Undefined variable: payment_type in /home/uccard5/public_html/modules/paypal/express_checkout/payment.php on line 289 Notice: Undefined variable: message in /home/uccard5/public_html/modules/paypal/express_checkout/payment.php on line 289 Fatal error: Call to undefined method Validate::isObject() in /home/uccard5/public_html/classes/PaymentModule.php on line 171 Then I check the paymenmodule.php it looks like this on line 171. if (!Validate::isObject($order_status)) { PrestaShopLogger::addLog('PaymentModule::validateOrder - Order Status cannot be loaded', 3, null, 'Cart', (int)$id_cart, true); throw new PrestaShopException('Can\'t load Order status'); } Then I check the /classes/validate.php to verify the classes unfortunately i could not find in the isObject method.
  8. Thank you for your reply however I have tried that and still the same. I have also upgraded my module to 3.8.0 , what I have notice that during my testing that the confirmation page after the payment is blank , then I check the "Shopping Cart" then I have saw multiple ID with the same Cart ID on the item that I have ordered. Then I tried to delete that shopping cart, then paste the "return page of paypal " and give me an error then it shows this paypal response (I have put XXX on identifiable information): <b>PayPal response:</b> BILLINGAGREEMENTACCEPTEDSTATUS -> 0 CHECKOUTSTATUS -> PaymentActionCompleted TIMESTAMP -> 2014-11-21T15:41:51Z EMAIL -> [email protected] PAYERID -> XXXXXXXXXX PAYERSTATUS -> unverified FIRSTNAME -> XXXXXXXXX LASTNAME -> XXXXX COUNTRYCODE -> PH SHIPTONAME -> Test Prod Tesa SHIPTOSTREET -> 124 SHIPTOSTREET2 -> waa SHIPTOCITY -> Makati SHIPTOZIP -> 1200 SHIPTOCOUNTRYCODE -> PH SHIPTOPHONENUM -> 121232323232 SHIPTOCOUNTRYNAME -> Philippines ADDRESSSTATUS -> Unconfirmed CURRENCYCODE -> USD AMT -> 0.10 ITEMAMT -> 0.10 SHIPPINGAMT -> 0.00 HANDLINGAMT -> 0.00 TAXAMT -> 0.00 INSURANCEAMT -> 0.00 SHIPDISCAMT -> 0.00 L_NAME0 -> Test Product - Do not Purchase L_NAME1 -> Philippines Local Shipping (Domestic Only) -- TEST DO NOT USE L_NUMBER0 -> 21 L_NUMBER1 -> 5 L_QTY0 -> 1 L_QTY1 -> 1 L_TAXAMT0 -> 0.00 L_TAXAMT1 -> 0.00 L_AMT0 -> 0.10 L_AMT1 -> 0.00 L_DESC0 -> ... L_ITEMWEIGHTVALUE0 -> 0.00000 L_ITEMWEIGHTVALUE1 -> 0.00000 L_ITEMLENGTHVALUE0 -> 0.00000 L_ITEMLENGTHVALUE1 -> 0.00000 L_ITEMWIDTHVALUE0 -> 0.00000 L_ITEMWIDTHVALUE1 -> 0.00000 L_ITEMHEIGHTVALUE0 -> 0.00000 L_ITEMHEIGHTVALUE1 -> 0.00000 PAYMENTREQUEST_0_CURRENCYCODE -> USD PAYMENTREQUEST_0_AMT -> 0.10 PAYMENTREQUEST_0_ITEMAMT -> 0.10 PAYMENTREQUEST_0_SHIPPINGAMT -> 0.00 PAYMENTREQUEST_0_HANDLINGAMT -> 0.00 PAYMENTREQUEST_0_TAXAMT -> 0.00 PAYMENTREQUEST_0_INSURANCEAMT -> 0.00 PAYMENTREQUEST_0_SHIPDISCAMT -> 0.00 PAYMENTREQUEST_0_TRANSACTIONID -> XXXXXXXXX PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED -> false PAYMENTREQUEST_0_SHIPTONAME -> Test Prod Tesa PAYMENTREQUEST_0_SHIPTOSTREET -> 124 PAYMENTREQUEST_0_SHIPTOSTREET2 -> waa PAYMENTREQUEST_0_SHIPTOCITY -> Makati PAYMENTREQUEST_0_SHIPTOZIP -> 1200 PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE -> PH PAYMENTREQUEST_0_SHIPTOPHONENUM -> 121232323232 PAYMENTREQUEST_0_SHIPTOCOUNTRYNAME -> Philippines PAYMENTREQUEST_0_ADDRESSSTATUS -> Unconfirmed PAYMENTREQUEST_0_ADDRESSNORMALIZATIONSTATUS -> None L_PAYMENTREQUEST_0_NAME0 -> Test Product - Do not Purchase L_PAYMENTREQUEST_0_NAME1 -> Philippines Local Shipping (Domestic Only) -- TEST DO NOT USE L_PAYMENTREQUEST_0_NUMBER0 -> 21 L_PAYMENTREQUEST_0_NUMBER1 -> 5 L_PAYMENTREQUEST_0_QTY0 -> 1 L_PAYMENTREQUEST_0_QTY1 -> 1 L_PAYMENTREQUEST_0_TAXAMT0 -> 0.00 L_PAYMENTREQUEST_0_TAXAMT1 -> 0.00 L_PAYMENTREQUEST_0_AMT0 -> 0.10 L_PAYMENTREQUEST_0_AMT1 -> 0.00 L_PAYMENTREQUEST_0_DESC0 -> ... L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE0 -> 0.00000 L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE1 -> 0.00000 L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0 -> 0.00000 L_PAYMENTREQUEST_0_ITEMLENGTHVALUE1 -> 0.00000 L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0 -> 0.00000 L_PAYMENTREQUEST_0_ITEMWIDTHVALUE1 -> 0.00000 L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0 -> 0.00000 L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE1 -> 0.00000 PAYMENTREQUESTINFO_0_TRANSACTIONID -> XXXXXXXX PAYMENTREQUESTINFO_0_ERRORCODE -> 0 Cart changed since the last checkout express, please make a new Paypal checkout payment Your cart is empty.
  9. same with me, i tried the code posted here on payment.php and IPN still the same, it does not have any order created in Pretashop but in paypal. Additionally, I have saw log on pretashop . "PaymentModule::validateOrder - Order Status cannot be loaded". All of the order that I have since I have encountered this issue have the same log entry on our Pretashop . Anyone have any idea if the error that I have encountered is the same as this issue? Or possible how to fix it? I am using "paypal EU 3.7.2" and tested w and w/o Exress checkout (Website Payments Standard)
×
×
  • Create New...