0

当我尝试通过我的站点后端使用 masspay api 汇款时收到以下错误:“masspay 服务器的输入不正确。请确保您使用的输入格式正确。,Masspay 未完成”

结果是钱没有转移。

这只发生在金额有小数位时。例如 4.25 欧元。当我尝试发送非小数金额时,它不会发生,例如 10 欧元、20 欧元或其他。

怎么了?

谢谢

4

1 回答 1

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');**
于 2012-03-03T14:24:44.640 回答