当我尝试通过我的网站后端使用masspay api汇款时收到以下错误:“对于Masspay服务器的输入不正确。请确保您使用格式正确的输入。”Masspay not not完整的“
结果是钱不转移。
仅当金额为十进制数字时才会发生这种情况。例如4.25€。当我尝试发送非小数,例如10€,20€或其他时,它不会发生。
发生了什么事?
由于
答案 0 :(得分: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');**