0

I receive the following error when I try to send money using masspay api through my site backend : "The input to the masspay server is incorrect. Please make sure that you are using a correctly formatted input. , Masspay not complete"

The result is that money don't transfer.

This only happens when the amount has decimal digits. For instance 4.25€. It's NOT happening when I try to send non decimal amounts, for instance 10€, 20€ or other.

What is happening?

Thanks

Kolevris
  • 1
  • 2
  • Wouldn't you think it would help to include the request you're sending, including the full response? – Robert Feb 29 '12 at 00:54
  • I haven't access to masspay api, cause it was pre-installed with the script I bought. Unfortunately the guys they made the script, ask money to fix this. But if you give me directions, I can try to fix it by myself. I may even give access to the site backend to someone who is willing to work on it. Thanks – Kolevris Feb 29 '12 at 11:52
  • SO is meant for programmers and developers with questions on the same. We're not a support desk. – Robert Mar 02 '12 at 00:37
  • @Robert you' re sure not...Could you give me directions on how to include the full response of masspay api, as you asked? – Kolevris Mar 02 '12 at 13:20
  • There's no universal way of getting that information, additionally, you'd need to first find the specific location within your code which calls the PayPal MassPay API. If even that's not available - and posting *all* your code is really not the way to go around it - you'll need to have a developer (or at least someone who can 'read code' look at the it). Since that's not something we can do for you, we can't answer this question for you. – Robert Mar 03 '12 at 01:22
  • Hope that cleared up my somewhat abrupt response from earlier! – Robert Mar 03 '12 at 01:23
  • Hi! No worries for abrupt response, I understand... – Kolevris Mar 03 '12 at 14:14

1 Answers1

0

if (!empty($userCashWithdrawalId) && !empty($cash_withdraw)) {

                            $data['Transaction']['user_id'] = ConstUserIds::Admin;

                            $data['Transaction']['foreign_id'] = $cash_withdraw['UserCashWithdrawal']['user_id'];

                            $data['Transaction']['class'] = 'SecondUser';

                            $data['Transaction']['amount'] = $cash_withdraw['UserCashWithdrawal']['amount'];

                            $data['Transaction']['description'] = 'User cash withdrawal request approved by admin';

                            $data['Transaction']['transaction_type_id'] = ConstTransactionTypes::AdminApprovedWithdrawalRequest;

                            $this->UserCashWithdrawal->User->Transaction->log($data);

                            $transaction_id = $this->UserCashWithdrawal->User->Transaction->getLastInsertId();

                            $data = array();

                            $data['Transaction']['user_id'] = $cash_withdraw['UserCashWithdrawal']['user_id'];

                            $data['Transaction']['foreign_id'] = ConstUserIds::Admin;

                            $data['Transaction']['class'] = 'SecondUser';

                            $data['Transaction']['amount'] = $cash_withdraw['UserCashWithdrawal']['amount'];

                            $data['Transaction']['description'] = 'User cash withdrawal request approved by admin';

                            $data['Transaction']['transaction_type_id'] = ConstTransactionTypes::AmountApprovedForUserCashWithdrawalRequest;

                            $this->UserCashWithdrawal->User->Transaction->log($data);

                            // update log transaction id

                            $paypal_log_array = array();

                            $paypal_log_array['PaypalTransactionLog']['id'] = $status['paypal_log_list'][$userCashWithdrawalId];

                            $paypal_log_array['PaypalTransactionLog']['transaction_id'] = $transaction_id;

                            $this->loadModel('PaypalTransactionLog');

                            $this->PaypalTransactionLog->save($paypal_log_array);

                            // update status

                            $user_cash_data = array();

                            $user_cash_data['UserCashWithdrawal']['id'] = $userCashWithdrawalId;

                            $user_cash_data['UserCashWithdrawal']['withdrawal_status_id'] = ConstWithdrawalStatus::Approved;

                            $this->UserCashWithdrawal->save($user_cash_data);

                        }

                    }

                    $messageType = 'success';

                    $flash_message = __l('Mass payment request is submitted in Paypal. User will be paid once process completed.');

                } **else {
                    $user_count = count($status['paypal_log_list']);
                    $flash_message = '';
                    for ($i = 0; $i < $user_count; $i++) {
                        if (!empty($status['paypal_response']['L_LONGMESSAGE' . $i])) {
                            $flash_message.= urldecode($status['paypal_response']['L_LONGMESSAGE' . $i]) . ' , ';
                        }
                    }
                    $messageType = 'error';
                    $flash_message.= __l(' Masspay not completed');**
Kolevris
  • 1
  • 2
  • This is the part of code where my script communicates with Masspay api. The last 'bold' section is there where the error message I attached in my initial post, is produced. I'm available in any further info you might need – Kolevris Mar 03 '12 at 14:28