0

サイトのバックエンドから Masspay API を使用して送金しようとすると、次のエラーが表示されます。

その結果、お金は移動しません。

これは、金額に 10 進数がある場合にのみ発生します。たとえば 4.25 ユーロ。10 ユーロ、20 ユーロなど、10 進数以外の金額を送信しようとすると、発生しません。

何が起こっている?

ありがとう

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 に答える