Skip to content

Instantly share code, notes, and snippets.

@danielVargas
Last active June 20, 2018 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielVargas/b2785bf1ab2f4e334fe801facdb2b4e1 to your computer and use it in GitHub Desktop.
Save danielVargas/b2785bf1ab2f4e334fe801facdb2b4e1 to your computer and use it in GitHub Desktop.
Función getTransactionResult del archivo webpaynormal.rb
def getTransactionResult(token)
### Otras líneas de la funcionalidad
### ...
###
#Realizar el acknowledge
puts 'Se inicia acknowledgeTransaction...'
result = acknowledgeTransaction(token)
if(result['error_desc'] == 'TRX_OK')
puts 'response normal:...'
return response_array
else
response_array ={
"error_desc" => 'La trasacción no se ha completado por exceder el tiempo de comunicación'
}
## Más adelante explicamos como realizar estos logs
WebpayInit.log('get_transaction_result', 'token: ' + token.to_s , 'response', response_array.to_s, token.to_s)
return response_array
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment